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 by the current workspace.

HTTP
GET $CLOUDSIGMA_API_BASE/workflow-templates

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. Prepare personal access token and target workspace ID that can access the target workspace.

Query parameters

Replace $CLOUDSIGMA_API_KEY and $WORKSPACE_ID with actual values.

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

summary only accepts omission, empty string, exact lowercase true or false. Other values ​​return 400 / ErrParamInvalid. Missing workspace returns ErrWorkspaceRequired.

Parameter

Type

Required

Description

summary

boolean

No

Omitted or the empty string returns the full definition. Only lowercase true or false is accepted, true returns a four-field summary.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": [
    {
      "id": 12,
      "name": "daily-import-template",
      "description": "每日导入工作流模板",
      "is_builtin": false,
      "workspace_id": "ws_01",
      "created_by": "user_01",
      "updated_by": "user_01",
      "template_key": "",
      "language": "",
      "definition_format": "dsl",
      "dsl_yaml": "",
      "runtime_fields": ""
    }
  ]
}

Field

Type

Description

code

string

success code.

msg

string

Response information.

data

array of object

The data returned by this operation.

data[].id

integer

ID of the current object.

data[].workspace_id

string

The workspace ID to which it belongs.

data[].created_by

string

Creator ID.

data[].updated_by

string

Identifier of the last updated person.

data[].template_key

string

Template key.

data[].name

string

The name of the current object.

data[].description

string

Description of the current object.

data[].language

string

language.

data[].definition_format

string

Define the format.

data[].workflow

JSON value

MOWL workflow definition.

data[].dsl_yaml

string

workflow DSL text.

data[].runtime_fields

string

Run the form.

data[].is_builtin

boolean

Whether it is a built-in template.

data[].created_at

string

Creation time. In RFC 3339 format.

data[].updated_at

string

Last updated time. In RFC 3339 format.

Error response

JSON
{
  "code": "ErrWorkspaceRequired",
  "msg": "需要工作区 ID"
}

Field

Type

Description

code

string

error code.

msg

string

Readable error message.

Common HTTP errors

HTTP status

Error code

Common cause

Recommended action

400

ErrParamInvalid, ErrWorkspaceRequired, ErrTemplateTypeImmutable, ErrSeedTemplateManaged, ErrUnsupportedLocale

Invalid request field, workspace, or operation precondition.

Fix the request parameters and submit again.

401

Unauthorized

Missing or invalid authentication credentials.

Check the credential type, expiration, and authentication header.

403

ErrForbidden

The current identity or active role does not have permission for this operation.

Use an authorized identity or contact an administrator to grant access.

404

ErrNotFound

The target object or required reference was not found.

Verify the object identifier, workspace, and current status.

409

ErrDuplicateName, ErrDuplicateKey, ErrAlreadyExists

Conflict in resource state, request payload, or concurrent modification.

Re-read the current state and version, then handle according to the latest result.

500

ErrServer

Internal processing failed; write operations may have been partially applied.

Retain request and trace details, and verify the current state before retrying.

503

ErrServiceUnavailable

A business, runtime, or authorization dependency is temporarily unavailable.

After the dependency recovers, check existing results first instead of blindly repeating writes.

Last updated on