Workflow status
Request this API resource to know about the status of a workflow.
Endpoint
The API endpoint for workflow status is:
https://host/api/v1/runtime/workflow/workflowId/action/status
where you have to replace:
host
with the host name or IP address of the NL Flow runtime.workflowId
with the workflow ID.
To get the actual endpoint for a workflow, access the NL Flow application and:
- Open the workflow in the Workflows view of the dashboard.
- Display identifying information.
- Copy the value of the Workflow status endpoint.
HTTP verb
The workflow status resource must be requested with the GET
verb.
Request headers
In every request you must set the following header:
X-API-KEY: APIKEY
where you have to replace APIKEY
with the API key associated with your workflow.
Response
The response body is a JSON object like this:
{
"desiredStatus": "PUBLISHED",
"actualStatus": "ORANGE",
"publishingMode": "ASYNC",
"details": {
"stream": {
"id": "benthos",
"desired": 1,
"actual": 1,
"status": "GREEN"
},
"services": [
{
"id": "executor-b3a6b290",
"desired": 1,
"actual": 0,
"status": "RED",
"rolloutStatus": "Complete"
},
{
"id": "knowledge-m-15607c4c",
"desired": 1,
"actual": 0,
"status": "RED",
"rolloutStatus": "Complete"
}
]
}
}
Its properties are:
desiredStatus
: target workflow status of the workflow, e.g.PUBLISHED
.-
actualStatus
: current workflow status:GREEN
: all the instances of the workflow's blocks are active, the workflow is usable.YELLOW
: not all the instances of multi-instance blocks are active, but at least one instance of each bock is active, so the workflow is usable.-
ORANGE
: at least one block doesn't have any active instance.
For synchronous workflows this means that the workflow is not usable until status becomes green.
For asynchronous workflows this means that the workflow accepts analysis tasks, so it's usable, but needs to activate block instances to actually perform analysis (its status will become green then).Note
Green status asynchronous workflows can automatically go back to orange status after some inactivity if the auto-scaling option was turned on at publish time.
-
publishingMode
:SYNC
for synchronous orASYNC
for asynchronous. -
details
: details on the publication status of the workflow components. Contains:-
stream
: information on the data stream, i.e. the service that deals with the passage of data from one block to another. Its properties are:id
: data stream IDdesired
: target number of instancesactual
: number of currently active instances-
status
current status of the service:GREEN
: all target instances are activeORANGE
: some instances are active, but not allRED
: there are no active instances
-
services
: information about the services corresponding to the workflow blocks plus, for asynchronous workflows, the executor service which CONSUMES acts as the tasks' queue manager. It is an array, each item of which corresponds to a service and has these properties:id
: service IDdesired
: target number of instancesactual
: number of currently active instances-
status
current status of the service:GREEN
: all target instances are activeORANGE
: some instances are active, but not allRED
: there are no active instances
-
rolloutStatus
andreplicasDetail
: troubleshooting information that may be requested from you by support personnel if you report a problem with the workflow.
-