更新时间:2022-09-14 GMT+08:00
分享

查询工作流详情

功能介绍

本接口用于根据工作流名称查询工作流详细信息。

请求消息样式

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

请求消息参数

表1 请求消息参数

名称

是否必选

参数类型

说明

约束

graph_name

String

工作流名称

名称必须以字母或数字开头,只能由字母、数字、下划线和中划线组成,长度小于等于64个字符。

请求消息头

该请求使用公共消息头,具体参见表3

请求消息元素

该请求消息中不带请求元素。

响应消息样式

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

json body

响应消息头

该请求的响应消息使用公共消息头,具体请参考表1

响应消息元素

表2 响应消息元素

名称

参数类型

说明

name

String

工作流的名称。

created_at

String

工作流的创建时间。

definition

JSON

工作流的定义。

graph_urn

String

工作流的URN。

description

String

工作流的描述。

错误响应消息

无特殊错误,所有错误已经包含在表2中。

请求示例

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

响应示例

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"
}
分享:

    相关文档

    相关产品