View workflow template details

Read the complete definition of a workflow template. Can read built-in templates for the current language, as well as custom templates created in the current workspace.

GET https://moi.matrixorigin.cn/newmoi/workflow-templates/{id}

Preparation before calling

First query workflow template list to obtain the template ID. Prepare a personal access token and target workspace ID that has access to the target workspace.

Request parameters

Request example

curl "https://moi.matrixorigin.cn/newmoi/workflow-templates/$TEMPLATE_ID" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Successful response

Returns 200 on success. data is a complete template object.

The response fields are as follows.

codestring
OK when successful.
msgstring
OK when successful.
data.idinteger
Template ID.
data.workspace_idstring
The ID of the workspace to which it belongs; the built-in template is an empty string.
data.created_bystring
Creator ID.
data.updated_bystring
Last updater ID.
data.template_keystring
Built-in template identifier; custom template is an empty string.
data.namestring
Template name.
data.descriptionstring
Template description.
data.languagestring
Template language.
data.dsl_yamlstring
Workflow DSL YAML.
data.runtime_fieldsstring
Runtime field JSON text; empty string when not configured.
data.is_builtinboolean
Whether it is a built-in template.
data.created_atstring
Creation time; may be omitted if not provided by the server.
data.updated_atstring
Last updated time; may be omitted if not provided by the server.

Successful response example

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "id": 12,
    "workspace_id": "ws-001",
    "created_by": "user-001",
    "updated_by": "user-001",
    "template_key": "",
    "name": "daily-import-template",
    "description": "每日导入工作流模板",
    "language": "zh-CN",
    "dsl_yaml": "workflow: {}",
    "runtime_fields": "{\"fields\":[]}",
    "is_builtin": false,
    "created_at": "2026-08-18T10:00:00Z",
    "updated_at": "2026-08-18T10:00:00Z"
  }
}

Error response

codestring
Error code.
msgstring
Readable error message.
datanull
`null` in an error response.

Error response example

{
  "code": "ErrNotFound",
  "msg": "模板不存在",
  "data": null
}

Follow-up operations

When the definition needs to be modified, Update workflow template; when it is no longer used, Delete workflow template.

Last updated on