Archive automation tasks

Archiving automation tasks. The 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

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First Query automation task details to confirm the current status of the task and obtain the task ID. Prepare a personal access token and target workspace ID that can access the target workspace.

Request parameters

Replace $WORKSPACE_ID, $TASK_ID, $CLOUDSIGMA_API_KEY in the example with actual values.

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"

Parameter

Type

Required

Description

workspace_id

string

Yes

workspace ID.

automation_task_id

string

Yes

Automation task ID.

Successful response

JSON
{
  "code": 0,
  "data": {
    "id": "task_01",
    "workspace_id": "ws_01",
    "agent_workspace_id": "",
    "name": "",
    "agent_id": "",
    "instruction_text": "",
    "trigger": {
      "mode": "cron"
    },
    "status": "archived",
    "version": 3,
    "execution": {
      "type": "agent",
      "system_flow_id": ""
    },
    "created_at": "2026-08-21T07:00:00Z",
    "updated_at": "2026-08-21T07:00:00Z"
  }
}

Field

Type

Description

data.id

string

Automation task ID and belonging workspace ID.

data.workspace_id

string

Automation task ID and belonging workspace ID.

data.agent_workspace_id

string

agent source workspace. Current workspace or system, not limited when filtering is omitted.

data.name

string

Name.

data.description

string

Description.

data.agent_id

string

agent ID.

data.model

string

model.

data.llm_backend_id

integer

Model backend ID.

data.instruction_text

string

Task instructions.

data.trigger

object

Trigger configuration.

data.trigger.mode

string

processing mode. Values: cron, api, callback.

data.trigger.cron_expression

string

Cron expressions.

data.trigger.result_mode

string

How to handle results.

data.trigger.service_name

string

Service name.

data.trigger.input_schema

object or null

Input field structure.

data.trigger.config

object or null

Configuration.

data.auth_policy

object

Authentication policy.

data.output_contract

object

Output convention.

data.status

string

archived on success. Values: draft, creating, active, failed, disabled, archived.

data.version

integer

Archived version of the task.

data.next_trigger_at

string

Next trigger time. RFC 3339 time.

data.api_summary

object

Summary of API calls.

data.api_summary.agent_automation_invoke

object

Automated call configuration.

data.api_summary.agent_automation_invoke.method

string

HTTP method.

data.api_summary.agent_automation_invoke.path

string

path.

data.api_summary.agent_automation_invoke.body_example

object

Request body example.

data.api_summary.agent_automation_invoke.body_example.service_name

string

Service name.

data.api_summary.agent_automation_invoke.body_example.payload

object or null

content.

data.last_run_summary

object

Summary of recent runs.

data.last_run_summary.run_id

string

Run ID.

data.last_run_summary.status

string

status. Values: queued, running, input_required, pending_approval, succeeded, failed, canceled, expired.

data.last_run_summary.trigger_type

string

Trigger type. Values: cron, api, manual, callback.

data.last_run_summary.automation_task_version

integer

Automated task version.

data.last_run_summary.output_validation_status

string

Output verification status.

data.last_run_summary.created_at

string

Creation time.

data.last_run_summary.updated_at

string

Update time.

data.last_run_summary.completed_at

string

Completion time.

data.last_run_summary.error_code

string

error code.

data.last_run_summary.error_message

string

error message.

data.labels

object

Tag mapping.

data.annotations

object

Annotation mapping.

data.execution

object

Execute configuration.

data.execution.type

string

type. Value: agent, deterministic_system_flow.

data.execution.system_flow_id

string

System process ID.

data.execution.parameters

object or null

Parameter definition.

data.execution.steps

array of object

Planning steps.

data.execution.steps[].id

string

logo.

data.execution.steps[].worker_id

string

Worker ID.

data.execution.steps[].workitem_id

string

Work item ID.

data.execution.steps[].operation

string

operation.

data.execution.steps[].repetition

string

Number of repetitions.

data.execution.steps[].parameters

object or null

Parameter definition.

data.created_at

string

Creation time. RFC 3339 time.

data.updated_at

string

Archive time, using RFC 3339 format. RFC 3339 time.

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.

Error response

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

Common HTTP errors

HTTP status code

error code

Description

400

2(INVALID_ARGUMENT)

The path parameter is invalid, or the current status of the task cannot be archived. Recommendation: Check the task ID and current status.

401

6(UNAUTHENTICATED)

Valid identity credentials are missing. Recommendation: Check the API Key.

404

3(NOT_FOUND)

The automated task does not exist. Suggestion: Check the task list first.

409

4(ALREADY_EXISTS)

The task status conflicts with the archive operation. Suggestion: Refresh the task details before performing the operation.

503

15(UNAVAILABLE)

The automated task service is unavailable. Suggestion: Check the current status first. Do not automatically resubmit.

Last updated on