Workflow Global Map
Workflow Global Map endpoints of the MedHook engine API: 2 operations with parameters, schemas and a curl example for each.
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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Responses
- 200The map.
Response fields
application/json · object
globalsarray of object3 fields
keystringvaluestring | number | booleanupdatedAtstring (date-time)
totalinteger
- 404Not found in the caller's workspace.
application/json · ApiError
Example request
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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
keyrequired | query | string | The key to reset. |
Responses
Example request
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).
errorstringrequiredHuman-readable error message.
codestringMachine-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"
detailsanyOptional structured context about the error.