OpenMax
免费试用

Apps API · Attempts

Attempts: 4 个接口

← 全部分组

GET /api/v1/attempts/{attempt_id}

Get attempt

权限(scope): work:attempt:read · 调用方式: appToken · operationId: get-attempt

Required app scope: work:attempt:read.

Returns an attempt by ID. Response wrapped in standard envelope.

参数

名字 位置 类型 必填 说明
attempt_id path string (uuid) 是 Attempt UUID

回包

POST /api/v1/attempts/{attempt_id}/transition

Transition attempt

权限(scope): work:attempt:write · 调用方式: appToken · operationId: transition-attempt

Required app scope: work:attempt:write.

Transitions an attempt to a target status. When an attempt of a private project's task becomes blocked on approval requests, the caller's own resource_grant / external_share requests among them become visible only to their participants (requester, approver, decider and the project owner), before the transition is recorded; app requests stay organization requests. The project owner is notified of a marked request without a named approver once the transition is answered; a notification that cannot be sent does not affect the transition. The run's project is read (as the caller) only when the caller names an own request not marked yet; if the caller may not read it, the transition goes ahead without that step; any other failure refuses it (503) and nothing changes. Response wrapped in standard envelope.

参数

名字 位置 类型 必填 说明
attempt_id path string (uuid) 是 Attempt UUID

请求体

application/json · TransitionAttemptRequestBody

字段 类型 必填 说明
blocked_on_approval_request_ids array of string (uuid) Blocked approval request UUIDs
failure_reason string Failure reason
target_status string: done, failed, blocked, cancelled 是 Terminal target attempt status

回包

GET /api/v1/tasks/{task_id}/attempts

List attempts

权限(scope): work:attempt:read · 调用方式: appToken · operationId: list-attempts

Required app scope: work:attempt:read.

Returns attempts for a task. Response wrapped in standard envelope.

参数

名字 位置 类型 必填 说明
task_id path string (uuid) 是 Task UUID
page query integer (int32) Page number (default: 1)
page_size query integer (int32) Items per page (default: 20, max: 100)
order_by query string Sort expression, e.g. created_at:desc

回包

POST /api/v1/tasks/{task_id}/attempts

Create attempt

权限(scope): work:attempt:write · 调用方式: appToken · operationId: create-attempt

Required app scope: work:attempt:write.

Creates an attempt for a task. Response wrapped in standard envelope.

参数

名字 位置 类型 必填 说明
task_id path string (uuid) 是 Task UUID

回包