Query the list of agent task templates¶
Query the agent task templates in the workspace and filter by associated agent, status or name.
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agent-task-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 a personal access token and workspace ID that can access the target workspace.
Request parameters¶
curl "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/agent-task-templates?limit=20&offset=0" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Target workspace ID. |
Query parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
No |
Associated agent ID. |
|
string |
No |
Template status. |
|
string |
No |
Filter by template name or description. |
|
integer |
No |
Return the quantity. |
|
integer |
No |
Return to starting position. |
Successful response¶
{
"code": 0,
"data": {
"items": [
{
"id": "template_01",
"workspace_id": "workspace_example",
"agent_id": "agent_01",
"name": "摘要任务",
"message_template": {
"role": "user",
"template": "请总结输入内容"
},
"idempotency_policy": {
"mode": "workflow_case"
},
"status": "draft",
"version": 1,
"created_at": "2026-10-14T00:00:00Z",
"updated_at": "2026-10-14T00:00:00Z"
}
],
"total": 1,
"limit": 20,
"offset": 0
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
object |
response data. |
|
array of object |
The record returned this time. |
|
string |
Object ID. |
|
string |
The workspace ID to which it belongs. |
|
string |
The associated agent ID. |
|
string |
Name. |
|
string |
Description. Can be omitted if not set. |
|
object |
Message template. |
|
object |
JSON Schema of the input parameters. Can be omitted if not set. |
|
array of object |
Default context resource reference. Can be omitted if not set. |
|
string |
Object ID. |
|
string |
Run policy reference. Can be omitted if not set. |
|
object |
Idempotent strategy. |
|
string |
Strategy or scope pattern. Values: |
|
string |
Custom idempotent key template. Can be omitted if not set. |
|
integer |
Idempotent window, in seconds. Can be omitted if not set. |
|
object |
Output convention. Can be omitted if not set. |
|
string |
Current status. Values: |
|
integer |
Current version number. |
|
object |
Tag key-value pairs. Can be omitted if not set. |
|
object |
Extended annotations. Can be omitted if not set. |
|
string |
Creator ID. Can be omitted if not set. |
|
string |
Last updated by identifier. Can be omitted if not set. |
|
string |
Creation time, in RFC 3339 format. |
|
string |
Last updated in RFC 3339 format. |
|
integer |
The total number of records that meet the criteria. |
|
integer |
The upper limit of the number of records used in this query. |
|
integer |
The offset used in this query. |
|
string |
Message role. |
|
string |
Message template text. Can be omitted when using parts. |
|
array or null |
Structured messages are composed of items, and the content is retained by the template. |
|
object or null |
Template variables. |
|
string |
Context resource type. |
|
string |
Resource address. Can be omitted when using id. |
|
string |
Resource version. Omitted if not set. |
|
object or null |
Resource allocation. Omitted if not set. |
Error response¶
{
"code": 2,
"message": "invalid agent task template filter"
}
Common HTTP errors
HTTP status code |
error code |
Description |
|---|---|---|
|
|
Common reasons: The filter or paging parameters are invalid. Recommended Action: Check the query parameters. |
|
|
Common Cause: Valid identity credentials are missing. Recommended Action: Check the API Key. |