Reset test resources for a running task

Delete temporary test resources tracked by a still-running task. See Shared information for objects, variables, and environment boundaries.

POST https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-test-scratch/reset

Before you call this API

Retain injected service URLs, credentials, Workspace, and short-lived authorization in the current generation task environment. Use complete original authorization header values. Install jq and set the example variables.

Request body

curl -X POST "${MOI_ENDPOINT%/}/workflow/v2/workflow-test-scratch/reset" \
  -H "X-API-Key: $MOI_API_KEY" \
  -H "X-Workspace-ID: $MOI_WORKSPACE_ID" \
  -H "X-MOI-Runtime-Authorization: $MOI_RUNTIME_AUTHORIZATION" \
  -H 'Content-Type: application/json' \
  --data-binary "$(jq -n  '{}')"

When a lease exists, the task must be working before deleting tracked test knowledge bases, volumes, and databases and removing the lease. This path cannot clean an existing lease after the task ends. No lease may return released directly; this does not establish whether resources were ever created. Cleanup failures retain a retryable state. Do not repeatedly call observation to recreate resources while failures remain unresolved. This operation does not delete published workflows.

Field

Type

Required

Description

task_id

string

Optional in task mode

Current task ID; required on the ordinary-identity path.

Successful response

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "state": "released"
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

Response information.

data

object

Result of this operation.

data.state

string

released means this reset left no lease awaiting deletion; it does not mean the entire task ended.

Error responses

Handle HTTP status and business fields. Historical queries and recovery have dedicated error codes; see Errors and environments. Retain identity, source references, and operation identifiers first, then check state before acting. Do not automatically change Workspace, candidate, or confirmation keys.

Last updated on