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

Querying Workflow Details

Functions

Queries workflow details based on the workflow name.

Request Syntax

GET /v2/workflows/{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 Request parameters

Parameter

Mandatory

Type

Description

Constraints

graph_name

Yes

String

Workflow name

The name should start with a letter or digit, and contain a maximum of 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

Request Headers

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

Request Elements

The request does not use request elements.

Response Syntax

HTTP/1.1 status code
Server: OBS
Date: date
Content-Length: length
X-Request-ID: obs request id

json body

Response Headers

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

Response Elements

Table 2 Response Elements

Parameter

Type

Description

name

String

Workflow name

created_at

String

Creation time of a workflow

definition

JSON

Workflow definition

graph_urn

String

Workflow URN

description

String

Workflow description

Error Responses

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

Sample Request

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

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

{
    "name": "test-graph",
    "created_at": "2020-04-23T12:20:07.602Z",
    "definition": {
        "agency": "agency",
        "event_defs": {
            "event1": {
                "event_source": "OBS",
                "trigger_bucket": "trigger-bucket-cnnorth5",
                "trigger_type": ["ObjectCreated:*"],
                "trigger_prefix": "",
                "trigger_suffix": ".mp5"
            }
        },
        "states": {
            "end": {
                "type": "END"
            },
            "state1": {
                "start": true,
                "type": "DELAY",
                "payload_filter_in": "$",
                "payload_filter_out": "$",
                "time_delay": 300,
                "next_state": "end"
            }
        },
        "inputs": {
            "<paramter name>": {
                "value": "TCP",
                "template_parameter_name": "<template input param name>",
                "default": "TCP",
                "type": "string",
                "label": "label_name",
                "constraints": "{\"valid_values\":[\"TCP\",\"UDP\"]}",
                "invisible": true,
                "description": "description param1"
            }
        }
    },
    "graph_urn": "urn:fgs:<region_id>:<project_id>:graph:<graph_name>",
    "description": "a graph demo"
}