View workflow template list

Lists built-in and custom workflow templates visible in the current workspace. Built-in templates are returned in the current language; custom templates only return templates created in the current workspace.

HTTP
GET $CLOUDSIGMA_API_BASE/workflow-templates

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

Request

Shell
curl "$CLOUDSIGMA_API_BASE/workflow-templates?summary=true" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Request parameters

Successful response

Returns 200 on success. summary=true when data is an array of digest objects:

When summary=true is not passed, each item returns the complete template definition:

The response fields are as follows.

In field paths, [] denotes each item in an array. For example, items[].name is the name field of each item in the items array. After a type, [] denotes an array; for example, string[] is an array of strings.

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": [
    {
      "id": 12,
      "name": "daily-import-template",
      "description": "每日导入工作流模板",
      "is_builtin": false
    }
  ]
}
FieldTypeDescription
codestringOK when successful.
msgstringOK when successful.
dataobject[]Template list; returns an empty array when there is no visible template.
data[].idintegerTemplate ID.
data[].namestringTemplate name.
data[].descriptionstringTemplate description.
data[].is_builtinbooleanWhether it is a built-in template.
data[].workspace_idstringThe workspace ID in full mode; the built-in template is an empty string.
data[].created_bystringCreator ID in full mode.
data[].updated_bystringThe last updater ID in full mode.
data[].template_keystringThe built-in template identifier in full mode; the custom template is an empty string.
data[].languagestringTemplate language in full mode.
data[].dsl_yamlstringWorkflow DSL YAML in full mode.
data[].runtime_fieldsstringRuntime field JSON text in full mode.
data[].created_atstringCreation time in full mode; may be omitted if not provided by the server.
data[].updated_atstringThe last update time in full mode; may be omitted if not provided by the server.

Error response

JSON
{
  "code": "ErrWorkspaceIDMissing",
  "msg": "需要工作区标识",
  "data": null
}
FieldTypeDescription
codestringError code.
msgstringReadable error message.
datanull`null` in an error response.

Follow-up operations

Use data[].id query workflow template details.

Last updated on