Update agent task template¶
Updates a saved agent task template; fields not provided retain their original values.
PATCH $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agent-task-templates/{template_id}
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
Obtain the template ID from the template list.
Set the operation-specific values used in the request:
$TEMPLATE_ID: Template ID to update.
Request¶
curl -X PATCH "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/agent-task-templates/$TEMPLATE_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"description": "用于工作流中的摘要节点"
}'
Path parameters
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The target workspace ID. |
|
string |
Yes |
The ID of the template to update. |
Request body
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
No |
Template name. |
|
string |
No |
ID of the agent to be called. |
|
string |
No |
Template description. |
|
object |
No |
Task message template. |
|
object |
No |
Input structure definition. |
|
array |
No |
Default context reference. |
|
string |
No |
Run policy reference. |
|
object |
No |
Idempotent policy. |
|
object |
No |
Output contract. |
|
string |
No |
Template status. |
|
object |
No |
Tag key-value pair. |
|
object |
No |
Annotation key-value pair. |
Successful response¶
Returns 200 and the updated template on success.
{"code": 0, "data": {"id": "template_01", "description": "用于工作流中的摘要节点"}}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
string |
Template ID. |
|
string |
Updated template description. |
Error response¶
{"code": 5, "message": "agent task template not found"}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The request body is invalid. |
Check the fields to be updated. |
|
|
The template does not exist. |
Check template ID. |