sendToWorkflow
A Graze API POST request that sends a Moolet Inform message to a workflow in an Inform Workflow Engine.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint sendToWorkflow
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| String | Yes | Name of an active Inform Workflow Engine. |
| String | Yes | Name of an active workflow within the specified Inform Workflow Engine. |
| Number | No | ID of the Situation you want to send to the workflow. |
| Number | No | ID of the alert you want to send to the workflow. |
| Map | No | Additional context to send with the message. This must be available as an action in the workflow as |
Response
Endpoint sendToWorkflow
returns the following response:
Examples
The following examples demonstrate typical use of endpoint sendToWorkflow
:
Request examples
Example cURL request to send a message to a Situation Inform Workflow Engine about Situation ID 12:
curl -X POST -u graze:graze -k "https://localhost/graze/v1/sendToWorkflow" \ -H "Content-Type: application/json; charset=UTF-8" \ --data '{ "engine_name" : "Situation Inform Engine", "workflow_name": "Workflow name", "sitn_id": 12, "context": {"hello": "world"} }'
Example cURL request to send a message to an alert Inform Workflow Engine about alert ID 35:
curl -X POST -u graze:graze -k "https://localhost/graze/v1/sendToWorkflow" \ -H "Content-Type: application/json; charset=UTF-8" \ --data '{ "engine_name" : "Alert Inform Engine", "workflow_name": "Workflow name", "alert_id": 35, "context": {"hello": "world"} }'