View workflow template details¶
Read the complete definition of a workflow template. Visible built-in templates can be read by ID, as well as custom templates created by the current workspace.
GET $CLOUDSIGMA_API_BASE/workflow-templates/{id}
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. First query the workflow template list to obtain the template ID. Prepare personal access token and target workspace ID that can access the target workspace.
Path parameters¶
Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID and $TEMPLATE_ID with actual values.
curl "$CLOUDSIGMA_API_BASE/workflow-templates/$TEMPLATE_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
Template ID greater than 0. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"id": 12,
"workspace_id": "ws-001",
"template_key": "",
"name": "daily-import-template",
"description": "每日导入工作流模板",
"language": "zh-CN",
"dsl_yaml": "workflow: {}",
"runtime_fields": "{\"fields\":[]}",
"is_builtin": false,
"created_by": "user_01",
"updated_by": "user_01",
"definition_format": "dsl"
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
success code. |
|
string |
Response information. |
|
object |
The data returned by this operation. |
|
integer |
Template ID. |
|
string |
The workspace ID to which it belongs. The built-in template is an empty string. |
|
string |
Creator ID. |
|
string |
Last updated by identifier. |
|
string |
Built-in template identification. Custom template is an empty string. |
|
string |
Template name. |
|
string |
Template description. |
|
string |
Template language. |
|
string |
Define the format. |
|
JSON value |
MOWL workflow definition. |
|
string |
workflow DSL YAML. |
|
string |
Runtime field JSON text. Empty string when not configured. |
|
boolean |
Whether it is a built-in template. |
|
string |
Creation time. Omitted if not provided by the server. In RFC 3339 format. |
|
string |
Last updated. Omitted if not provided by the server. In RFC 3339 format. |
Error response¶
{
"code": "ErrNotFound",
"msg": "未找到工作流模板"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |
Common HTTP errors¶
HTTP status |
Error code |
Common cause |
Recommended action |
|---|---|---|---|
400 |
|
Invalid request field, workspace, or operation precondition. |
Fix the request parameters and submit again. |
401 |
|
Missing or invalid authentication credentials. |
Check the credential type, expiration, and authentication header. |
403 |
|
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 |
|
The target object or required reference was not found. |
Verify the object identifier, workspace, and current status. |
409 |
|
Conflict in resource state, request payload, or concurrent modification. |
Re-read the current state and version, then handle according to the latest result. |
500 |
|
Internal processing failed; write operations may have been partially applied. |
Retain request and trace details, and verify the current state before retrying. |
503 |
|
A business, runtime, or authorization dependency is temporarily unavailable. |
After the dependency recovers, check existing results first instead of blindly repeating writes. |