GetWorkflowDefinition - 获取数据开发工作流详情

调用该接口,可以获取指定工作流的详细信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
ProjectIdstring

DataWorks 工作空间的 ID。您可以登录 DataWorks 控制台,进入工作空间管理页面获取 ID。

该参数用来确定本次 API 调用操作使用的 DataWorks 工作空间。

10000
Idstring

数据开发工作流唯一标识符

860438872620113XXXX

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求的 ID。用于定位日志,排查问题。

F2BDD628-8A21-5BD1-B930-1A2D5989XXXX
WorkflowDefinitionobject

数据开发工作流的详细信息

Idstring

数据开发工作流唯一标识符

463497880880954XXXX
ProjectIdstring

数据开发工作流所在工作空间的 ID。

307XXX
Namestring

数据开发工作流名称

OpenAPI测试工作流Demo
Ownerstring

数据开发工作流的责任人

110755000425XXXX
CreateTimelong

数据开发工作流的创建时间戳

1708481905000
ModifyTimelong

数据开发工作流的最近更新时间戳

1708481905000
Specstring

描述这个工作流的 FlowSpec 信息,具体规范详见 FlowSpec

{ "metadata": { "tenantId": "52425742456XXXX", "projectId": "307XXX", "uuid": "463497880880954XXXX" }, "kind": "CycleWorkflow", "version": "1.1.0", "spec": { "name": "OpenAPI测试工作流Demo", "id": "463497880880954XXXX", "type": "CycleWorkflow", "owner": "110755000425XXXX", "workflows": [ { "script": { "path": "XX/OpenAPI测试/工作流测试/OpenAPI测试工作流Demo", "runtime": { "command": "WORKFLOW" }, "id": "698002781368644XXXX" }, "id": "463497880880954XXXX", "trigger": { "type": "Scheduler", "id": "652567824470354XXXX", "cron": "00 02 00 * * ?", "startTime": "1970-01-01 00:00:00", "endTime": "9999-01-01 00:00:00", "timezone": "Asia/Shanghai", "delaySeconds": 0 }, "strategy": { "timeout": 0, "instanceMode": "T+1", "rerunMode": "Allowed", "rerunTimes": 3, "rerunInterval": 180000, "failureStrategy": "Break" }, "name": "OpenAPI测试工作流Demo", "owner": "110755000425XXXX", "metadata": { "owner": "110755000425XXXX", "ownerName": "XXXX@test.XXXX.com", "tenantId": "52425742456XXXX", "project": { "mode": "STANDARD", "projectId": "307303", "projectIdentifier": "lwttest_standard", "projectName": "XXXX", "projectOwnerId": "110755000425XXXX", "simple": false, "tenantId": "52425742456XXXX" }, "projectId": "307XXXX" }, "inputs": {}, "outputs": { "nodeOutputs": [ { "data": "463497880880954XXXX", "artifactType": "NodeOutput", "refTableName": "OpenAPI测试工作流Demo", "isDefault": true } ] }, "nodes": [ ], "dependencies": [] } ] } }

示例

正常返回示例

JSON格式

{
  "RequestId": "F2BDD628-8A21-5BD1-B930-1A2D5989XXXX",
  "WorkflowDefinition": {
    "Id": "463497880880954XXXX",
    "ProjectId": "307XXX",
    "Name": "OpenAPI测试工作流Demo",
    "Owner": "110755000425XXXX",
    "CreateTime": 1708481905000,
    "ModifyTime": 1708481905000,
    "Spec": "{\n    \"metadata\": {\n        \"tenantId\": \"52425742456XXXX\",\n        \"projectId\": \"307XXX\",\n        \"uuid\": \"463497880880954XXXX\"\n    },\n    \"kind\": \"CycleWorkflow\",\n    \"version\": \"1.1.0\",\n    \"spec\": {\n        \"name\": \"OpenAPI测试工作流Demo\",\n        \"id\": \"463497880880954XXXX\",\n        \"type\": \"CycleWorkflow\",\n        \"owner\": \"110755000425XXXX\",\n        \"workflows\": [\n            {\n                \"script\": {\n                    \"path\": \"XX/OpenAPI测试/工作流测试/OpenAPI测试工作流Demo\",\n                    \"runtime\": {\n                        \"command\": \"WORKFLOW\"\n                    },\n                    \"id\": \"698002781368644XXXX\"\n                },\n                \"id\": \"463497880880954XXXX\",\n                \"trigger\": {\n                    \"type\": \"Scheduler\",\n                    \"id\": \"652567824470354XXXX\",\n                    \"cron\": \"00 02 00 * * ?\",\n                    \"startTime\": \"1970-01-01 00:00:00\",\n                    \"endTime\": \"9999-01-01 00:00:00\",\n                    \"timezone\": \"Asia/Shanghai\",\n                    \"delaySeconds\": 0\n                },\n                \"strategy\": {\n                    \"timeout\": 0,\n                    \"instanceMode\": \"T+1\",\n                    \"rerunMode\": \"Allowed\",\n                    \"rerunTimes\": 3,\n                    \"rerunInterval\": 180000,\n                    \"failureStrategy\": \"Break\"\n                },\n                \"name\": \"OpenAPI测试工作流Demo\",\n                \"owner\": \"110755000425XXXX\",\n                \"metadata\": {\n                    \"owner\": \"110755000425XXXX\",\n                    \"ownerName\": \"XXXX@test.XXXX.com\",\n                    \"tenantId\": \"52425742456XXXX\",\n                    \"project\": {\n                        \"mode\": \"STANDARD\",\n                        \"projectId\": \"307303\",\n                        \"projectIdentifier\": \"lwttest_standard\",\n                        \"projectName\": \"XXXX\",\n                        \"projectOwnerId\": \"110755000425XXXX\",\n                        \"simple\": false,\n                        \"tenantId\": \"52425742456XXXX\"\n                    },\n                    \"projectId\": \"307XXXX\"\n                },\n                \"inputs\": {},\n                \"outputs\": {\n                    \"nodeOutputs\": [\n                        {\n                            \"data\": \"463497880880954XXXX\",\n                            \"artifactType\": \"NodeOutput\",\n                            \"refTableName\": \"OpenAPI测试工作流Demo\",\n                            \"isDefault\": true\n                        }\n                    ]\n                },\n                \"nodes\": [\n                    \n                ],\n                \"dependencies\": []\n            }\n        ]\n    }\n}"
  }
}

错误码

访问错误中心查看更多错误码。