Archive automation tasks

Archiving automation tasks. This interface does not physically delete the task, but instead sets its status to archived.

HTTP
DELETE $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agent-automation-tasks/{automation_task_id}

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

First Query automation task detailsconfirm the current status of the task and obtain the task ID.

Set the operation-specific values used in the request:

  • $WORKSPACE_ID: Target workspace ID, passed through the X-Workspace-ID header and also as workspace_id in the path.

  • $TASK_ID: The automation task ID to be archived, as automation_task_id in the path.

Request

Shell
curl -X DELETE "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/agent-automation-tasks/$TASK_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

Parameters

Type

Is it required

Description

workspace_id

string

Yes

Workspace ID.

automation_task_id

string

Yes

Automation task ID.

Successful response

Returns 200 on success. data returns the archived task, data.status as archived. Tasks should not be considered triggerable after being archived.

JSON
{
  "code": 0,
  "data": {
    "id": "task_01",
    "workspace_id": "ws_01",
    "status": "archived",
    "version": 3,
    "updated_at": "2026-08-18T03:00:00Z"
  }
}

The response fields are as follows.

Field

Type

Description

code

integer

0 on success.

data.id

string

Automation task ID and associated workspace ID.

data.workspace_id

string

Automation task ID and associated workspace ID.

data.status

string

archived on success.

data.version

integer

Archived task version.

data.updated_at

string

Archive time, using RFC 3339 format.

Other fields of data

object

Are consistent with the task fields returned by Query automation task details.

Error response

JSON
{
  "code": 3,
  "message": "<错误信息>"
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

400

2(INVALID_ARGUMENT)

The path parameter is invalid, or the current status of the task cannot be archived.

Check task ID and current status.

401

6(UNAUTHENTICATED)

Lack of valid identity credentials.

Check API Key.

404

3(NOT_FOUND)

The automated task does not exist.

Check the task list first.

409

4(ALREADY_EXISTS)

Task status conflicts with archiving operation.

Refresh task details before performing the operation.

503

15(UNAVAILABLE)

The automated task service is unavailable.

Try again later.

Follow-up operations

If you need to retain the running results before archiving, please record the run ID that needs to be retained and query the corresponding running details or results.

Last updated on