Skip to content
Engine API

Workflow Global Map

Workflow Global Map endpoints of the MedHook engine API: 2 operations with parameters, schemas and a curl example for each.

On this page

A workflow's global map (globals in JavaScript steps): scalars only, not for PHI or secrets.

Read a workflow's global map

get/api/workflows/{id}/globals

Every key with its value and update time.

Minimum role: operator.

Auth: Bearer token (how to get one) · Operation: listWorkflowGlobals

Parameters

NameInTypeDescription
idrequiredpathstring

Workflow id.

Responses

  • 200The map.
    Response fields

    application/json · object

    • globalsarray of object
      3 fields
      • keystring
      • valuestring | number | boolean
      • updatedAtstring (date-time)
    • totalinteger
  • 404Not found in the caller's workspace.

    application/json · ApiError

Example request

curl
curl "$ENGINE_URL/api/workflows/<id>/globals" \
  -H "Authorization: Bearer $TOKEN"

Reset one global map key

delete/api/workflows/{id}/globals

Deletes the key. Audited (workflow_global.reset).

Minimum role: operator.

Auth: Bearer token (how to get one) · Operation: resetWorkflowGlobal

Parameters

NameInTypeDescription
idrequiredpathstring

Workflow id.

keyrequiredquerystring

The key to reset.

Responses

  • 200Deleted.
    Response fields

    application/json · object

    • deletedboolean
  • 400The request is malformed or fails validation.

    application/json · ApiError

  • 404Not found in the caller's workspace.

    application/json · ApiError

Example request

curl
curl -X DELETE "$ENGINE_URL/api/workflows/<id>/globals?key=string" \
  -H "Authorization: Bearer $TOKEN"

Schemas

Named objects the operations above link to.

ApiError

The error body. error is always present. code is present on most errors and is the field to branch on; a few routes and the sign-in and role checks return only error (and sometimes detail).

  • errorstringrequired

    Human-readable error message.

  • codestring

    Machine-readable error code.

    One of: "BAD_REQUEST", "INVALID_REQUEST", "UNAUTHORIZED", "UNAUTHENTICATED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "UNPROCESSABLE_ENTITY", "RATE_LIMITED", "INTERNAL_ERROR", "SERVICE_UNAVAILABLE", "NOT_CONFIGURED", "SIGNATURE_REQUIRED", "INVALID_SIGNATURE", "TIMESTAMP_REQUIRED", "TIMESTAMP_INVALID", "TIMESTAMP_OUT_OF_TOLERANCE", "INVALID_CREDENTIALS", "INVALID_TOKEN", "PAYLOAD_TOO_LARGE", "INVALID_NDJSON", "PHI_NOT_AUTHORIZED", "PHI_IN_SANDBOX", "IN_PROGRESS", "RETRY_SCHEDULED", "WORKFLOW_DISABLED", "CONFLICTING_SCOPE", "ALREADY_DELIVERED", "CHAIN_TOO_DEEP", "NO_FAILED_DESTINATION", "STALE_SCOPE", "UNKNOWN_DESTINATION", "NO_DESTINATIONS", "NOT_A_MESSAGE", "AI_FEATURES_DISABLED"

  • detailsany

    Optional structured context about the error.