Help Center> Object Storage Service> API Reference> APIs> Data+> Querying a Workflow Instance

Querying a Workflow Instance

Functions

Queries details of a specified workflow instance.

Request Syntax

GET /v2/workflowexecutions/{execution_name}?x-workflow-graph-name={graph_name} HTTP/1.1
Host: obs.cn-north-4.myhuaweicloud.com 
Authorization: authorization
Content-Type: application/json
Content-Length: length
Date: date

Request parameters

Table 1 Parameters

Parameter

Mandatory

Type

Description

Constraints

execution_name

Yes

string

Workflow instance name

The workflow instance must be an existing one.

x-workflow-graph-name

Yes

string

Workflow name

The workflow must be an existing one.

Request Headers

This request uses common headers. For details, see Table 3.

Request Elements

This request contains no message parameters.

Response Syntax

HTTP/1.1 status_code 
Date: date 
Content-Length: length 
Content-Type: type
X-Request-ID: obs request id

Response Headers

The response to the request uses common headers. For details, see Table 1.

Response Elements

Table 2 Response elements

Parameter

Type

Description

execution_info

json

Instance information.

Error Responses

No special error responses are returned. For details about error responses, see Table 2.

Sample Request

GET /v2/workflowexecutions/{execution_name}?x-workflow-graph-name={graph_name} HTTP/1.1
Host: obs.cn-north-4.myhuaweicloud.com 
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:sc2PM13Wlfcoc/YZLK0MwsI2Zpo=
Content-Type: application/json
Content-Length: 0
Date: Thu, 27 Aug 2020 12:38:10 GMT

Sample Response

HTTP/1.1 200 OK 
Date: Thu, 27 Aug 2020 12:38:10 GMT 
Content-Length: 100 
Content-Type: application/json
X-Request-ID: 6a63a18b8bab40ffb71ebd9cb80d0085
{
    "execution_info": {
        "input": "[{\"x\":123,\"y\":321},{\"x\":586}]",
        "isTest": true,
        "graph_urn": "urn:fgs:<region_id>:<project_id>:graph:<graph_name>",
        "execution_urn": "urn:fgs:<region_id>:<project_id>:execution:<graph_name>:<execution_name>:<domain_id>",
        "execution_name": "<execution_name>",
        "started_at": "2017-11-13T07:14:04.849Z",
        "state_map": {
            "next1": {
                "state_name": "next1",
                "status": "NOTRUNNING",
                "type": "NOOP"
            },
            "end1": {
                "state_name": "end1",
                "status": "NOTRUNNING",
                "type": "END"
            },
            "hello": {
                "state_name": "hello",
                "status": "RUNNING",
                "started_at": "2017-11-13T07:14:04.893Z",
                "type": "DELAY",
                "input": "[{\"x\":123,\"y\":321},{\"x\":586}]"
            }
        },
        "start_state": "hello",
        "execution_state": "RUNNING",
        "execution_type": "APICALL"
    }
}