Skip to content
AGH RuntimeAPI Reference

Tasks

AGH Tasks HTTP endpoints.

Audience
Operators running durable agent work
Focus
API Reference guidance shaped for scanability, day-two clarity, and operator context.

Atomically claim the next matching task run for the calling agent

POST/api/agent/tasks/claim-next

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/tasks/claim-next" \  -H "Content-Type: application/json" \  -d '{}'
{
  "claim": {
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "lease": {
      "claim_token_hash": "string",
      "claimed_by": {
        "kind": "human",
        "ref": "string"
      },
      "coordination_channel": {
        "allowed_message_kinds": [
          "status"
        ],
        "channel": "string",
        "display_name": "string",
        "id": "string",
        "last_activity_at": "2019-08-24T14:15:22Z",
        "purpose": "string",
        "run_id": "string",
        "task_id": "string",
        "workflow_id": "string",
        "workspace_id": "string"
      },
      "coordination_channel_id": "string",
      "heartbeat_at": "2019-08-24T14:15:22Z",
      "lease_until": "2019-08-24T14:15:22Z",
      "run_id": "string",
      "session_id": "string",
      "status": "queued",
      "task_id": "string"
    },
    "run": {
      "attempt": 0,
      "claim_token_hash": "string",
      "claimed_at": "2019-08-24T14:15:22Z",
      "claimed_by": {
        "kind": "human",
        "ref": "string"
      },
      "coordination_channel": {
        "allowed_message_kinds": [
          "status"
        ],
        "channel": "string",
        "display_name": "string",
        "id": "string",
        "last_activity_at": "2019-08-24T14:15:22Z",
        "purpose": "string",
        "run_id": "string",
        "task_id": "string",
        "workflow_id": "string",
        "workspace_id": "string"
      },
      "coordination_channel_id": "string",
      "ended_at": "2019-08-24T14:15:22Z",
      "error": "string",
      "heartbeat_at": "2019-08-24T14:15:22Z",
      "id": "string",
      "idempotency_key": "string",
      "lease_until": "2019-08-24T14:15:22Z",
      "metadata": null,
      "network_channel": "string",
      "origin": {
        "kind": "cli",
        "ref": "string"
      },
      "queued_at": "2019-08-24T14:15:22Z",
      "result": null,
      "session_id": "string",
      "started_at": "2019-08-24T14:15:22Z",
      "status": "queued",
      "task_id": "string"
    },
    "task": {
      "id": "string",
      "identifier": "string",
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "priority": "low",
      "scope": "global",
      "status": "draft",
      "title": "string",
      "workspace_id": "string"
    }
  }
}
Empty
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Complete a claimed task run for the calling agent

POST/api/agent/tasks/{run_id}/complete

Path Parameters

run_id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

result?unknown

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/tasks/string/complete" \  -H "Content-Type: application/json" \  -d '{}'
{
  "lease": {
    "claim_token_hash": "string",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "lease_until": "2019-08-24T14:15:22Z",
    "run_id": "string",
    "session_id": "string",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Fail a claimed task run for the calling agent

POST/api/agent/tasks/{run_id}/fail

Path Parameters

run_id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/tasks/string/fail" \  -H "Content-Type: application/json" \  -d '{    "error": "string"  }'
{
  "lease": {
    "claim_token_hash": "string",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "lease_until": "2019-08-24T14:15:22Z",
    "run_id": "string",
    "session_id": "string",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Extend a claimed task-run lease for the calling agent

POST/api/agent/tasks/{run_id}/heartbeat

Path Parameters

run_id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/tasks/string/heartbeat" \  -H "Content-Type: application/json" \  -d '{}'
{
  "lease": {
    "claim_token_hash": "string",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "lease_until": "2019-08-24T14:15:22Z",
    "run_id": "string",
    "session_id": "string",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Release a claimed task run for the calling agent

POST/api/agent/tasks/{run_id}/release

Path Parameters

run_id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

reason?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/agent/tasks/string/release" \  -H "Content-Type: application/json" \  -d '{}'
{
  "lease": {
    "claim_token_hash": "string",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "lease_until": "2019-08-24T14:15:22Z",
    "run_id": "string",
    "session_id": "string",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Get the observer-backed task dashboard

GET/api/observe/tasks/dashboard

Query Parameters

scope?string

Filter by task scope

Value in"global" | "workspace"
workspace?string

Filter by workspace path, name, or ID

owner_kind?string

Filter by owner kind

Value in"human" | "agent_session" | "automation" | "extension" | "network_peer" | "pool"
owner_ref?string

Filter by owner reference

network_channel?string

Filter by network channel

origin_kind?string

Filter by task origin kind

Value in"cli" | "web" | "uds" | "http" | "automation" | "extension" | "network" | "agent_session" | "daemon"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/observe/tasks/dashboard"
{
  "dashboard": {
    "active_runs": {
      "claimed": 0,
      "items": [
        {
          "age_ms": 0,
          "attempt": 0,
          "error": "string",
          "health_status": "string",
          "last_activity_at": "2019-08-24T14:15:22Z",
          "max_attempts": 0,
          "network_channel": "string",
          "run_id": "string",
          "run_status": "queued",
          "scope": "global",
          "session_id": "string",
          "stuck": true,
          "task_id": "string",
          "task_identifier": "string",
          "task_owner": {
            "kind": "human",
            "ref": "string"
          },
          "task_priority": "low",
          "task_status": "draft",
          "task_title": "string",
          "workspace_id": "string"
        }
      ],
      "queued": 0,
      "running": 0,
      "starting": 0,
      "total": 0
    },
    "cards": {
      "blocked": {
        "awaiting_approval": 0,
        "awaiting_dependencies": 0,
        "health_status": "string",
        "tasks": 0
      },
      "failed": {
        "failed_runs": 0,
        "forced_stops": 0,
        "health_status": "string",
        "tasks": 0
      },
      "in_progress": {
        "active_runs": 0,
        "claimed_runs": 0,
        "health_status": "string",
        "queued_runs": 0,
        "running_runs": 0,
        "starting_runs": 0,
        "tasks": 0
      },
      "latency": {
        "claim_latency_ms": {
          "average_ms": 0,
          "maximum_ms": 0,
          "samples": 0
        },
        "start_latency_ms": {
          "average_ms": 0,
          "maximum_ms": 0,
          "samples": 0
        }
      }
    },
    "freshness": {
      "age_ms": 0,
      "has_live_work": true,
      "latest_activity_at": "2019-08-24T14:15:22Z",
      "observed_at": "2019-08-24T14:15:22Z",
      "stale": true,
      "stale_after_ms": 0,
      "status": "string"
    },
    "health": {
      "active_orphan_runs": 0,
      "queue_backlog": true,
      "status": "string",
      "stuck_runs": 0
    },
    "queue": {
      "backlog_status": "string",
      "backlog_threshold_ms": 0,
      "backlog_warning": true,
      "depth": [
        {
          "count": 0,
          "network_channel": "string",
          "oldest_queue_age_ms": 0,
          "oldest_queued_at": "2019-08-24T14:15:22Z"
        }
      ],
      "oldest_queue_age_ms": 0,
      "oldest_queued_at": "2019-08-24T14:15:22Z",
      "total": 0
    },
    "status_breakdown": [
      {
        "count": 0,
        "share_percent": 0,
        "status": "draft"
      }
    ],
    "totals": {
      "active_runs": 0,
      "awaiting_approval_tasks": 0,
      "blocked_tasks": 0,
      "canceled_runs": 0,
      "canceled_tasks": 0,
      "claimed_runs": 0,
      "completed_runs": 0,
      "completed_tasks": 0,
      "dependency_blocked_tasks": 0,
      "draft_tasks": 0,
      "failed_runs": 0,
      "failed_tasks": 0,
      "in_progress_tasks": 0,
      "pending_tasks": 0,
      "queued_runs": 0,
      "ready_tasks": 0,
      "running_runs": 0,
      "runs_total": 0,
      "starting_runs": 0,
      "tasks_total": 0
    }
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Get the observer-backed task inbox

GET/api/observe/tasks/inbox

Query Parameters

scope?string

Filter by task scope

Value in"global" | "workspace"
workspace?string

Filter by workspace path, name, or ID

owner_kind?string

Filter by owner kind

Value in"human" | "agent_session" | "automation" | "extension" | "network_peer" | "pool"
owner_ref?string

Filter by owner reference

lane?string

Filter by inbox lane

Value in"my_work" | "approvals" | "failed_runs" | "blocked" | "archived"
unread?boolean

Return only unread inbox items

query?string

Filter by task title or identifier

limit?integer

Maximum number of inbox items to return

Formatint32

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/observe/tasks/inbox"
{
  "inbox": {
    "archived_total": 0,
    "groups": [
      {
        "count": 0,
        "items": [
          {
            "approval_policy": "none",
            "approval_state": "not_required",
            "blocking_reason": "string",
            "lane": "my_work",
            "latest_activity_at": "2019-08-24T14:15:22Z",
            "run": {
              "attempt": 0,
              "claim_token_hash": "string",
              "claimed_at": "2019-08-24T14:15:22Z",
              "claimed_by": {
                "kind": "human",
                "ref": "string"
              },
              "coordination_channel": {
                "allowed_message_kinds": [
                  "status"
                ],
                "channel": "string",
                "display_name": "string",
                "id": "string",
                "last_activity_at": "2019-08-24T14:15:22Z",
                "purpose": "string",
                "run_id": "string",
                "task_id": "string",
                "workflow_id": "string",
                "workspace_id": "string"
              },
              "coordination_channel_id": "string",
              "ended_at": "2019-08-24T14:15:22Z",
              "error": "string",
              "heartbeat_at": "2019-08-24T14:15:22Z",
              "id": "string",
              "lease_until": "2019-08-24T14:15:22Z",
              "max_attempts": 0,
              "queued_at": "2019-08-24T14:15:22Z",
              "session_id": "string",
              "started_at": "2019-08-24T14:15:22Z",
              "status": "queued",
              "task_id": "string"
            },
            "task": {
              "id": "string",
              "identifier": "string",
              "owner": {
                "kind": "human",
                "ref": "string"
              },
              "priority": "low",
              "scope": "global",
              "status": "draft",
              "title": "string",
              "workspace_id": "string"
            },
            "triage": {
              "actor": {
                "kind": "human",
                "ref": "string"
              },
              "archived": true,
              "dismissed": true,
              "last_seen_activity_at": "2019-08-24T14:15:22Z",
              "read": true,
              "task_id": "string",
              "updated_at": "2019-08-24T14:15:22Z"
            }
          }
        ],
        "lane": "my_work",
        "unread_count": 0
      }
    ],
    "total": 0,
    "unread_total": 0
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Get one task run detail

GET/api/task-runs/{id}

Path Parameters

id*string

Task run id

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/task-runs/string"
{
  "run": {
    "run": {
      "attempt": 0,
      "claim_token_hash": "string",
      "claimed_at": "2019-08-24T14:15:22Z",
      "claimed_by": {
        "kind": "human",
        "ref": "string"
      },
      "coordination_channel": {
        "allowed_message_kinds": [
          "status"
        ],
        "channel": "string",
        "display_name": "string",
        "id": "string",
        "last_activity_at": "2019-08-24T14:15:22Z",
        "purpose": "string",
        "run_id": "string",
        "task_id": "string",
        "workflow_id": "string",
        "workspace_id": "string"
      },
      "coordination_channel_id": "string",
      "ended_at": "2019-08-24T14:15:22Z",
      "error": "string",
      "heartbeat_at": "2019-08-24T14:15:22Z",
      "id": "string",
      "idempotency_key": "string",
      "lease_until": "2019-08-24T14:15:22Z",
      "metadata": null,
      "network_channel": "string",
      "origin": {
        "kind": "cli",
        "ref": "string"
      },
      "queued_at": "2019-08-24T14:15:22Z",
      "result": null,
      "session_id": "string",
      "started_at": "2019-08-24T14:15:22Z",
      "status": "queued",
      "task_id": "string"
    },
    "session": {
      "agent_name": "string",
      "channel": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "name": "string",
      "session_id": "string",
      "state": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "workspace_id": "string"
    },
    "summary": {
      "cost_currency": "string",
      "input_tokens": 0,
      "last_activity_at": "2019-08-24T14:15:22Z",
      "last_event_type": "string",
      "output_tokens": 0,
      "tool_call_count": 0,
      "total_cost": 0,
      "total_tokens": 0,
      "turn_count": 0
    },
    "task": {
      "id": "string",
      "identifier": "string",
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "priority": "low",
      "scope": "global",
      "status": "draft",
      "title": "string",
      "workspace_id": "string"
    }
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Attach an existing session to one task run

POST/api/task-runs/{id}/attach-session

Path Parameters

id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

session_id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/task-runs/string/attach-session" \  -H "Content-Type: application/json" \  -d '{    "session_id": "string"  }'
{
  "run": {
    "attempt": 0,
    "claim_token_hash": "string",
    "claimed_at": "2019-08-24T14:15:22Z",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "ended_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "idempotency_key": "string",
    "lease_until": "2019-08-24T14:15:22Z",
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "queued_at": "2019-08-24T14:15:22Z",
    "result": null,
    "session_id": "string",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Cancel one task run

POST/api/task-runs/{id}/cancel

Path Parameters

id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/task-runs/string/cancel" \  -H "Content-Type: application/json" \  -d '{}'
{
  "run": {
    "attempt": 0,
    "claim_token_hash": "string",
    "claimed_at": "2019-08-24T14:15:22Z",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "ended_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "idempotency_key": "string",
    "lease_until": "2019-08-24T14:15:22Z",
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "queued_at": "2019-08-24T14:15:22Z",
    "result": null,
    "session_id": "string",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Claim one queued task run

POST/api/task-runs/{id}/claim

Path Parameters

id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

idempotency_key?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/task-runs/string/claim" \  -H "Content-Type: application/json" \  -d '{}'
{
  "run": {
    "attempt": 0,
    "claim_token_hash": "string",
    "claimed_at": "2019-08-24T14:15:22Z",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "ended_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "idempotency_key": "string",
    "lease_until": "2019-08-24T14:15:22Z",
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "queued_at": "2019-08-24T14:15:22Z",
    "result": null,
    "session_id": "string",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Complete one running task run

POST/api/task-runs/{id}/complete

Path Parameters

id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

result?unknown

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/task-runs/string/complete" \  -H "Content-Type: application/json" \  -d '{}'
{
  "run": {
    "attempt": 0,
    "claim_token_hash": "string",
    "claimed_at": "2019-08-24T14:15:22Z",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "ended_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "idempotency_key": "string",
    "lease_until": "2019-08-24T14:15:22Z",
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "queued_at": "2019-08-24T14:15:22Z",
    "result": null,
    "session_id": "string",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Fail one task run

POST/api/task-runs/{id}/fail

Path Parameters

id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/task-runs/string/fail" \  -H "Content-Type: application/json" \  -d '{    "error": "string"  }'
{
  "run": {
    "attempt": 0,
    "claim_token_hash": "string",
    "claimed_at": "2019-08-24T14:15:22Z",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "ended_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "idempotency_key": "string",
    "lease_until": "2019-08-24T14:15:22Z",
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "queued_at": "2019-08-24T14:15:22Z",
    "result": null,
    "session_id": "string",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Start one claimed task run

POST/api/task-runs/{id}/start

Path Parameters

id*string

Task run id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

idempotency_key?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/task-runs/string/start" \  -H "Content-Type: application/json" \  -d '{}'
{
  "run": {
    "attempt": 0,
    "claim_token_hash": "string",
    "claimed_at": "2019-08-24T14:15:22Z",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "ended_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "idempotency_key": "string",
    "lease_until": "2019-08-24T14:15:22Z",
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "queued_at": "2019-08-24T14:15:22Z",
    "result": null,
    "session_id": "string",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

List enriched tasks

GET/api/tasks

Query Parameters

scope?string

Filter by task scope

Value in"global" | "workspace"
workspace?string

Filter by workspace path, name, or ID

status?string

Filter by task status

Value in"draft" | "pending" | "blocked" | "ready" | "in_progress" | "completed" | "failed" | "canceled"
priority?string

Filter by task priority

Value in"low" | "medium" | "high" | "urgent"
include_drafts?boolean

Include draft tasks in list results

approval_state?string

Filter by task approval state

Value in"not_required" | "pending" | "approved" | "rejected"
owner_kind?string

Filter by owner kind

Value in"human" | "agent_session" | "automation" | "extension" | "network_peer" | "pool"
owner_ref?string

Filter by owner reference

parent_task_id?string

Filter by parent task ID

network_channel?string

Filter by network channel

query?string

Filter by task title or identifier

limit?integer

Maximum number of records to return

Formatint32

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/tasks"
{
  "tasks": [
    {
      "active_run": {
        "attempt": 0,
        "claim_token_hash": "string",
        "claimed_at": "2019-08-24T14:15:22Z",
        "claimed_by": {
          "kind": "human",
          "ref": "string"
        },
        "coordination_channel": {
          "allowed_message_kinds": [
            "status"
          ],
          "channel": "string",
          "display_name": "string",
          "id": "string",
          "last_activity_at": "2019-08-24T14:15:22Z",
          "purpose": "string",
          "run_id": "string",
          "task_id": "string",
          "workflow_id": "string",
          "workspace_id": "string"
        },
        "coordination_channel_id": "string",
        "ended_at": "2019-08-24T14:15:22Z",
        "error": "string",
        "heartbeat_at": "2019-08-24T14:15:22Z",
        "id": "string",
        "lease_until": "2019-08-24T14:15:22Z",
        "max_attempts": 0,
        "queued_at": "2019-08-24T14:15:22Z",
        "session_id": "string",
        "started_at": "2019-08-24T14:15:22Z",
        "status": "queued",
        "task_id": "string"
      },
      "approval_policy": "none",
      "approval_state": "not_required",
      "child_count": 0,
      "closed_at": "2019-08-24T14:15:22Z",
      "created_at": "2019-08-24T14:15:22Z",
      "created_by": {
        "kind": "human",
        "ref": "string"
      },
      "dependencies": [
        {
          "created_at": "2019-08-24T14:15:22Z",
          "depends_on": {
            "id": "string",
            "identifier": "string",
            "owner": {
              "kind": "human",
              "ref": "string"
            },
            "priority": "low",
            "scope": "global",
            "status": "draft",
            "title": "string",
            "workspace_id": "string"
          },
          "depends_on_task_id": "string",
          "kind": "blocks",
          "task_id": "string"
        }
      ],
      "dependency_count": 0,
      "draft": true,
      "id": "string",
      "identifier": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "max_attempts": 0,
      "network_channel": "string",
      "origin": {
        "kind": "cli",
        "ref": "string"
      },
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "parent_task_id": "string",
      "priority": "low",
      "scope": "global",
      "status": "draft",
      "title": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "workspace_id": "string"
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Create a task

POST/api/tasks

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/tasks" \  -H "Content-Type: application/json" \  -d '{    "scope": "global",    "title": "string"  }'
{
  "task": {
    "approval_policy": "none",
    "approval_state": "not_required",
    "closed_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
      "kind": "human",
      "ref": "string"
    },
    "description": "string",
    "draft": true,
    "id": "string",
    "identifier": "string",
    "max_attempts": 0,
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "owner": {
      "kind": "human",
      "ref": "string"
    },
    "parent_task_id": "string",
    "priority": "low",
    "scope": "global",
    "status": "draft",
    "title": "string",
    "updated_at": "2019-08-24T14:15:22Z",
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Get one task with detail

GET/api/tasks/{id}

Path Parameters

id*string

Task id

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/tasks/string"
{
  "task": {
    "children": [
      {
        "active_run": {
          "attempt": 0,
          "claim_token_hash": "string",
          "claimed_at": "2019-08-24T14:15:22Z",
          "claimed_by": {
            "kind": "human",
            "ref": "string"
          },
          "coordination_channel": {
            "allowed_message_kinds": [
              "status"
            ],
            "channel": "string",
            "display_name": "string",
            "id": "string",
            "last_activity_at": "2019-08-24T14:15:22Z",
            "purpose": "string",
            "run_id": "string",
            "task_id": "string",
            "workflow_id": "string",
            "workspace_id": "string"
          },
          "coordination_channel_id": "string",
          "ended_at": "2019-08-24T14:15:22Z",
          "error": "string",
          "heartbeat_at": "2019-08-24T14:15:22Z",
          "id": "string",
          "lease_until": "2019-08-24T14:15:22Z",
          "max_attempts": 0,
          "queued_at": "2019-08-24T14:15:22Z",
          "session_id": "string",
          "started_at": "2019-08-24T14:15:22Z",
          "status": "queued",
          "task_id": "string"
        },
        "approval_policy": "none",
        "approval_state": "not_required",
        "child_count": 0,
        "closed_at": "2019-08-24T14:15:22Z",
        "created_at": "2019-08-24T14:15:22Z",
        "created_by": {
          "kind": "human",
          "ref": "string"
        },
        "dependencies": [
          {
            "created_at": "2019-08-24T14:15:22Z",
            "depends_on": {
              "id": "string",
              "identifier": "string",
              "owner": {
                "kind": "human",
                "ref": "string"
              },
              "priority": "low",
              "scope": "global",
              "status": "draft",
              "title": "string",
              "workspace_id": "string"
            },
            "depends_on_task_id": "string",
            "kind": "blocks",
            "task_id": "string"
          }
        ],
        "dependency_count": 0,
        "draft": true,
        "id": "string",
        "identifier": "string",
        "last_activity_at": "2019-08-24T14:15:22Z",
        "max_attempts": 0,
        "network_channel": "string",
        "origin": {
          "kind": "cli",
          "ref": "string"
        },
        "owner": {
          "kind": "human",
          "ref": "string"
        },
        "parent_task_id": "string",
        "priority": "low",
        "scope": "global",
        "status": "draft",
        "title": "string",
        "updated_at": "2019-08-24T14:15:22Z",
        "workspace_id": "string"
      }
    ],
    "dependencies": [
      {
        "created_at": "2019-08-24T14:15:22Z",
        "depends_on_task_id": "string",
        "kind": "blocks",
        "task_id": "string"
      }
    ],
    "dependency_references": [
      {
        "created_at": "2019-08-24T14:15:22Z",
        "depends_on": {
          "id": "string",
          "identifier": "string",
          "owner": {
            "kind": "human",
            "ref": "string"
          },
          "priority": "low",
          "scope": "global",
          "status": "draft",
          "title": "string",
          "workspace_id": "string"
        },
        "depends_on_task_id": "string",
        "kind": "blocks",
        "task_id": "string"
      }
    ],
    "events": [
      {
        "actor": {
          "kind": "human",
          "ref": "string"
        },
        "event_type": "string",
        "id": "string",
        "origin": {
          "kind": "cli",
          "ref": "string"
        },
        "payload": null,
        "run_id": "string",
        "task_id": "string",
        "timestamp": "2019-08-24T14:15:22Z"
      }
    ],
    "runs": [
      {
        "attempt": 0,
        "claim_token_hash": "string",
        "claimed_at": "2019-08-24T14:15:22Z",
        "claimed_by": {
          "kind": "human",
          "ref": "string"
        },
        "coordination_channel": {
          "allowed_message_kinds": [
            "status"
          ],
          "channel": "string",
          "display_name": "string",
          "id": "string",
          "last_activity_at": "2019-08-24T14:15:22Z",
          "purpose": "string",
          "run_id": "string",
          "task_id": "string",
          "workflow_id": "string",
          "workspace_id": "string"
        },
        "coordination_channel_id": "string",
        "ended_at": "2019-08-24T14:15:22Z",
        "error": "string",
        "heartbeat_at": "2019-08-24T14:15:22Z",
        "id": "string",
        "idempotency_key": "string",
        "lease_until": "2019-08-24T14:15:22Z",
        "metadata": null,
        "network_channel": "string",
        "origin": {
          "kind": "cli",
          "ref": "string"
        },
        "queued_at": "2019-08-24T14:15:22Z",
        "result": null,
        "session_id": "string",
        "started_at": "2019-08-24T14:15:22Z",
        "status": "queued",
        "task_id": "string"
      }
    ],
    "summary": {
      "active_run": {
        "attempt": 0,
        "claim_token_hash": "string",
        "claimed_at": "2019-08-24T14:15:22Z",
        "claimed_by": {
          "kind": "human",
          "ref": "string"
        },
        "coordination_channel": {
          "allowed_message_kinds": [
            "status"
          ],
          "channel": "string",
          "display_name": "string",
          "id": "string",
          "last_activity_at": "2019-08-24T14:15:22Z",
          "purpose": "string",
          "run_id": "string",
          "task_id": "string",
          "workflow_id": "string",
          "workspace_id": "string"
        },
        "coordination_channel_id": "string",
        "ended_at": "2019-08-24T14:15:22Z",
        "error": "string",
        "heartbeat_at": "2019-08-24T14:15:22Z",
        "id": "string",
        "lease_until": "2019-08-24T14:15:22Z",
        "max_attempts": 0,
        "queued_at": "2019-08-24T14:15:22Z",
        "session_id": "string",
        "started_at": "2019-08-24T14:15:22Z",
        "status": "queued",
        "task_id": "string"
      },
      "approval_policy": "none",
      "approval_state": "not_required",
      "child_count": 0,
      "closed_at": "2019-08-24T14:15:22Z",
      "created_at": "2019-08-24T14:15:22Z",
      "created_by": {
        "kind": "human",
        "ref": "string"
      },
      "dependencies": [
        {
          "created_at": "2019-08-24T14:15:22Z",
          "depends_on": {
            "id": "string",
            "identifier": "string",
            "owner": {
              "kind": "human",
              "ref": "string"
            },
            "priority": "low",
            "scope": "global",
            "status": "draft",
            "title": "string",
            "workspace_id": "string"
          },
          "depends_on_task_id": "string",
          "kind": "blocks",
          "task_id": "string"
        }
      ],
      "dependency_count": 0,
      "draft": true,
      "id": "string",
      "identifier": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "max_attempts": 0,
      "network_channel": "string",
      "origin": {
        "kind": "cli",
        "ref": "string"
      },
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "parent_task_id": "string",
      "priority": "low",
      "scope": "global",
      "status": "draft",
      "title": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "workspace_id": "string"
    },
    "task": {
      "approval_policy": "none",
      "approval_state": "not_required",
      "closed_at": "2019-08-24T14:15:22Z",
      "created_at": "2019-08-24T14:15:22Z",
      "created_by": {
        "kind": "human",
        "ref": "string"
      },
      "description": "string",
      "draft": true,
      "id": "string",
      "identifier": "string",
      "max_attempts": 0,
      "metadata": null,
      "network_channel": "string",
      "origin": {
        "kind": "cli",
        "ref": "string"
      },
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "parent_task_id": "string",
      "priority": "low",
      "scope": "global",
      "status": "draft",
      "title": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "workspace_id": "string"
    }
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Update one task

PATCH/api/tasks/{id}

Path Parameters

id*string

Task id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://loading/api/tasks/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "task": {
    "approval_policy": "none",
    "approval_state": "not_required",
    "closed_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
      "kind": "human",
      "ref": "string"
    },
    "description": "string",
    "draft": true,
    "id": "string",
    "identifier": "string",
    "max_attempts": 0,
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "owner": {
      "kind": "human",
      "ref": "string"
    },
    "parent_task_id": "string",
    "priority": "low",
    "scope": "global",
    "status": "draft",
    "title": "string",
    "updated_at": "2019-08-24T14:15:22Z",
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Delete one task

DELETE/api/tasks/{id}

Path Parameters

id*string

Task id

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://loading/api/tasks/string"
Empty
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Approve one approval-gated task and enqueue executable work

POST/api/tasks/{id}/approve

Path Parameters

id*string

Task id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/tasks/string/approve" \  -H "Content-Type: application/json" \  -d '{}'
{
  "run": {
    "attempt": 0,
    "claim_token_hash": "string",
    "claimed_at": "2019-08-24T14:15:22Z",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "ended_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "idempotency_key": "string",
    "lease_until": "2019-08-24T14:15:22Z",
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "queued_at": "2019-08-24T14:15:22Z",
    "result": null,
    "session_id": "string",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "queued",
    "task_id": "string"
  },
  "task": {
    "approval_policy": "none",
    "approval_state": "not_required",
    "closed_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
      "kind": "human",
      "ref": "string"
    },
    "description": "string",
    "draft": true,
    "id": "string",
    "identifier": "string",
    "max_attempts": 0,
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "owner": {
      "kind": "human",
      "ref": "string"
    },
    "parent_task_id": "string",
    "priority": "low",
    "scope": "global",
    "status": "draft",
    "title": "string",
    "updated_at": "2019-08-24T14:15:22Z",
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Cancel one task tree

POST/api/tasks/{id}/cancel

Path Parameters

id*string

Task id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/tasks/string/cancel" \  -H "Content-Type: application/json" \  -d '{}'
{
  "task": {
    "approval_policy": "none",
    "approval_state": "not_required",
    "closed_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
      "kind": "human",
      "ref": "string"
    },
    "description": "string",
    "draft": true,
    "id": "string",
    "identifier": "string",
    "max_attempts": 0,
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "owner": {
      "kind": "human",
      "ref": "string"
    },
    "parent_task_id": "string",
    "priority": "low",
    "scope": "global",
    "status": "draft",
    "title": "string",
    "updated_at": "2019-08-24T14:15:22Z",
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Create one child task

POST/api/tasks/{id}/children

Path Parameters

id*string

Parent task id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/tasks/string/children" \  -H "Content-Type: application/json" \  -d '{    "scope": "global",    "title": "string"  }'
{
  "task": {
    "approval_policy": "none",
    "approval_state": "not_required",
    "closed_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
      "kind": "human",
      "ref": "string"
    },
    "description": "string",
    "draft": true,
    "id": "string",
    "identifier": "string",
    "max_attempts": 0,
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "owner": {
      "kind": "human",
      "ref": "string"
    },
    "parent_task_id": "string",
    "priority": "low",
    "scope": "global",
    "status": "draft",
    "title": "string",
    "updated_at": "2019-08-24T14:15:22Z",
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Add one task dependency

POST/api/tasks/{id}/dependencies

Path Parameters

id*string

Task id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/tasks/string/dependencies" \  -H "Content-Type: application/json" \  -d '{    "depends_on_task_id": "string"  }'
{
  "task": {
    "children": [
      {
        "active_run": {
          "attempt": 0,
          "claim_token_hash": "string",
          "claimed_at": "2019-08-24T14:15:22Z",
          "claimed_by": {
            "kind": "human",
            "ref": "string"
          },
          "coordination_channel": {
            "allowed_message_kinds": [
              "status"
            ],
            "channel": "string",
            "display_name": "string",
            "id": "string",
            "last_activity_at": "2019-08-24T14:15:22Z",
            "purpose": "string",
            "run_id": "string",
            "task_id": "string",
            "workflow_id": "string",
            "workspace_id": "string"
          },
          "coordination_channel_id": "string",
          "ended_at": "2019-08-24T14:15:22Z",
          "error": "string",
          "heartbeat_at": "2019-08-24T14:15:22Z",
          "id": "string",
          "lease_until": "2019-08-24T14:15:22Z",
          "max_attempts": 0,
          "queued_at": "2019-08-24T14:15:22Z",
          "session_id": "string",
          "started_at": "2019-08-24T14:15:22Z",
          "status": "queued",
          "task_id": "string"
        },
        "approval_policy": "none",
        "approval_state": "not_required",
        "child_count": 0,
        "closed_at": "2019-08-24T14:15:22Z",
        "created_at": "2019-08-24T14:15:22Z",
        "created_by": {
          "kind": "human",
          "ref": "string"
        },
        "dependencies": [
          {
            "created_at": "2019-08-24T14:15:22Z",
            "depends_on": {
              "id": "string",
              "identifier": "string",
              "owner": {
                "kind": "human",
                "ref": "string"
              },
              "priority": "low",
              "scope": "global",
              "status": "draft",
              "title": "string",
              "workspace_id": "string"
            },
            "depends_on_task_id": "string",
            "kind": "blocks",
            "task_id": "string"
          }
        ],
        "dependency_count": 0,
        "draft": true,
        "id": "string",
        "identifier": "string",
        "last_activity_at": "2019-08-24T14:15:22Z",
        "max_attempts": 0,
        "network_channel": "string",
        "origin": {
          "kind": "cli",
          "ref": "string"
        },
        "owner": {
          "kind": "human",
          "ref": "string"
        },
        "parent_task_id": "string",
        "priority": "low",
        "scope": "global",
        "status": "draft",
        "title": "string",
        "updated_at": "2019-08-24T14:15:22Z",
        "workspace_id": "string"
      }
    ],
    "dependencies": [
      {
        "created_at": "2019-08-24T14:15:22Z",
        "depends_on_task_id": "string",
        "kind": "blocks",
        "task_id": "string"
      }
    ],
    "dependency_references": [
      {
        "created_at": "2019-08-24T14:15:22Z",
        "depends_on": {
          "id": "string",
          "identifier": "string",
          "owner": {
            "kind": "human",
            "ref": "string"
          },
          "priority": "low",
          "scope": "global",
          "status": "draft",
          "title": "string",
          "workspace_id": "string"
        },
        "depends_on_task_id": "string",
        "kind": "blocks",
        "task_id": "string"
      }
    ],
    "events": [
      {
        "actor": {
          "kind": "human",
          "ref": "string"
        },
        "event_type": "string",
        "id": "string",
        "origin": {
          "kind": "cli",
          "ref": "string"
        },
        "payload": null,
        "run_id": "string",
        "task_id": "string",
        "timestamp": "2019-08-24T14:15:22Z"
      }
    ],
    "runs": [
      {
        "attempt": 0,
        "claim_token_hash": "string",
        "claimed_at": "2019-08-24T14:15:22Z",
        "claimed_by": {
          "kind": "human",
          "ref": "string"
        },
        "coordination_channel": {
          "allowed_message_kinds": [
            "status"
          ],
          "channel": "string",
          "display_name": "string",
          "id": "string",
          "last_activity_at": "2019-08-24T14:15:22Z",
          "purpose": "string",
          "run_id": "string",
          "task_id": "string",
          "workflow_id": "string",
          "workspace_id": "string"
        },
        "coordination_channel_id": "string",
        "ended_at": "2019-08-24T14:15:22Z",
        "error": "string",
        "heartbeat_at": "2019-08-24T14:15:22Z",
        "id": "string",
        "idempotency_key": "string",
        "lease_until": "2019-08-24T14:15:22Z",
        "metadata": null,
        "network_channel": "string",
        "origin": {
          "kind": "cli",
          "ref": "string"
        },
        "queued_at": "2019-08-24T14:15:22Z",
        "result": null,
        "session_id": "string",
        "started_at": "2019-08-24T14:15:22Z",
        "status": "queued",
        "task_id": "string"
      }
    ],
    "summary": {
      "active_run": {
        "attempt": 0,
        "claim_token_hash": "string",
        "claimed_at": "2019-08-24T14:15:22Z",
        "claimed_by": {
          "kind": "human",
          "ref": "string"
        },
        "coordination_channel": {
          "allowed_message_kinds": [
            "status"
          ],
          "channel": "string",
          "display_name": "string",
          "id": "string",
          "last_activity_at": "2019-08-24T14:15:22Z",
          "purpose": "string",
          "run_id": "string",
          "task_id": "string",
          "workflow_id": "string",
          "workspace_id": "string"
        },
        "coordination_channel_id": "string",
        "ended_at": "2019-08-24T14:15:22Z",
        "error": "string",
        "heartbeat_at": "2019-08-24T14:15:22Z",
        "id": "string",
        "lease_until": "2019-08-24T14:15:22Z",
        "max_attempts": 0,
        "queued_at": "2019-08-24T14:15:22Z",
        "session_id": "string",
        "started_at": "2019-08-24T14:15:22Z",
        "status": "queued",
        "task_id": "string"
      },
      "approval_policy": "none",
      "approval_state": "not_required",
      "child_count": 0,
      "closed_at": "2019-08-24T14:15:22Z",
      "created_at": "2019-08-24T14:15:22Z",
      "created_by": {
        "kind": "human",
        "ref": "string"
      },
      "dependencies": [
        {
          "created_at": "2019-08-24T14:15:22Z",
          "depends_on": {
            "id": "string",
            "identifier": "string",
            "owner": {
              "kind": "human",
              "ref": "string"
            },
            "priority": "low",
            "scope": "global",
            "status": "draft",
            "title": "string",
            "workspace_id": "string"
          },
          "depends_on_task_id": "string",
          "kind": "blocks",
          "task_id": "string"
        }
      ],
      "dependency_count": 0,
      "draft": true,
      "id": "string",
      "identifier": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "max_attempts": 0,
      "network_channel": "string",
      "origin": {
        "kind": "cli",
        "ref": "string"
      },
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "parent_task_id": "string",
      "priority": "low",
      "scope": "global",
      "status": "draft",
      "title": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "workspace_id": "string"
    },
    "task": {
      "approval_policy": "none",
      "approval_state": "not_required",
      "closed_at": "2019-08-24T14:15:22Z",
      "created_at": "2019-08-24T14:15:22Z",
      "created_by": {
        "kind": "human",
        "ref": "string"
      },
      "description": "string",
      "draft": true,
      "id": "string",
      "identifier": "string",
      "max_attempts": 0,
      "metadata": null,
      "network_channel": "string",
      "origin": {
        "kind": "cli",
        "ref": "string"
      },
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "parent_task_id": "string",
      "priority": "low",
      "scope": "global",
      "status": "draft",
      "title": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "workspace_id": "string"
    }
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Remove one task dependency

DELETE/api/tasks/{id}/dependencies/{depends_on_id}

Path Parameters

id*string

Task id

depends_on_id*string

Dependency task id

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://loading/api/tasks/string/dependencies/string"
{
  "task": {
    "children": [
      {
        "active_run": {
          "attempt": 0,
          "claim_token_hash": "string",
          "claimed_at": "2019-08-24T14:15:22Z",
          "claimed_by": {
            "kind": "human",
            "ref": "string"
          },
          "coordination_channel": {
            "allowed_message_kinds": [
              "status"
            ],
            "channel": "string",
            "display_name": "string",
            "id": "string",
            "last_activity_at": "2019-08-24T14:15:22Z",
            "purpose": "string",
            "run_id": "string",
            "task_id": "string",
            "workflow_id": "string",
            "workspace_id": "string"
          },
          "coordination_channel_id": "string",
          "ended_at": "2019-08-24T14:15:22Z",
          "error": "string",
          "heartbeat_at": "2019-08-24T14:15:22Z",
          "id": "string",
          "lease_until": "2019-08-24T14:15:22Z",
          "max_attempts": 0,
          "queued_at": "2019-08-24T14:15:22Z",
          "session_id": "string",
          "started_at": "2019-08-24T14:15:22Z",
          "status": "queued",
          "task_id": "string"
        },
        "approval_policy": "none",
        "approval_state": "not_required",
        "child_count": 0,
        "closed_at": "2019-08-24T14:15:22Z",
        "created_at": "2019-08-24T14:15:22Z",
        "created_by": {
          "kind": "human",
          "ref": "string"
        },
        "dependencies": [
          {
            "created_at": "2019-08-24T14:15:22Z",
            "depends_on": {
              "id": "string",
              "identifier": "string",
              "owner": {
                "kind": "human",
                "ref": "string"
              },
              "priority": "low",
              "scope": "global",
              "status": "draft",
              "title": "string",
              "workspace_id": "string"
            },
            "depends_on_task_id": "string",
            "kind": "blocks",
            "task_id": "string"
          }
        ],
        "dependency_count": 0,
        "draft": true,
        "id": "string",
        "identifier": "string",
        "last_activity_at": "2019-08-24T14:15:22Z",
        "max_attempts": 0,
        "network_channel": "string",
        "origin": {
          "kind": "cli",
          "ref": "string"
        },
        "owner": {
          "kind": "human",
          "ref": "string"
        },
        "parent_task_id": "string",
        "priority": "low",
        "scope": "global",
        "status": "draft",
        "title": "string",
        "updated_at": "2019-08-24T14:15:22Z",
        "workspace_id": "string"
      }
    ],
    "dependencies": [
      {
        "created_at": "2019-08-24T14:15:22Z",
        "depends_on_task_id": "string",
        "kind": "blocks",
        "task_id": "string"
      }
    ],
    "dependency_references": [
      {
        "created_at": "2019-08-24T14:15:22Z",
        "depends_on": {
          "id": "string",
          "identifier": "string",
          "owner": {
            "kind": "human",
            "ref": "string"
          },
          "priority": "low",
          "scope": "global",
          "status": "draft",
          "title": "string",
          "workspace_id": "string"
        },
        "depends_on_task_id": "string",
        "kind": "blocks",
        "task_id": "string"
      }
    ],
    "events": [
      {
        "actor": {
          "kind": "human",
          "ref": "string"
        },
        "event_type": "string",
        "id": "string",
        "origin": {
          "kind": "cli",
          "ref": "string"
        },
        "payload": null,
        "run_id": "string",
        "task_id": "string",
        "timestamp": "2019-08-24T14:15:22Z"
      }
    ],
    "runs": [
      {
        "attempt": 0,
        "claim_token_hash": "string",
        "claimed_at": "2019-08-24T14:15:22Z",
        "claimed_by": {
          "kind": "human",
          "ref": "string"
        },
        "coordination_channel": {
          "allowed_message_kinds": [
            "status"
          ],
          "channel": "string",
          "display_name": "string",
          "id": "string",
          "last_activity_at": "2019-08-24T14:15:22Z",
          "purpose": "string",
          "run_id": "string",
          "task_id": "string",
          "workflow_id": "string",
          "workspace_id": "string"
        },
        "coordination_channel_id": "string",
        "ended_at": "2019-08-24T14:15:22Z",
        "error": "string",
        "heartbeat_at": "2019-08-24T14:15:22Z",
        "id": "string",
        "idempotency_key": "string",
        "lease_until": "2019-08-24T14:15:22Z",
        "metadata": null,
        "network_channel": "string",
        "origin": {
          "kind": "cli",
          "ref": "string"
        },
        "queued_at": "2019-08-24T14:15:22Z",
        "result": null,
        "session_id": "string",
        "started_at": "2019-08-24T14:15:22Z",
        "status": "queued",
        "task_id": "string"
      }
    ],
    "summary": {
      "active_run": {
        "attempt": 0,
        "claim_token_hash": "string",
        "claimed_at": "2019-08-24T14:15:22Z",
        "claimed_by": {
          "kind": "human",
          "ref": "string"
        },
        "coordination_channel": {
          "allowed_message_kinds": [
            "status"
          ],
          "channel": "string",
          "display_name": "string",
          "id": "string",
          "last_activity_at": "2019-08-24T14:15:22Z",
          "purpose": "string",
          "run_id": "string",
          "task_id": "string",
          "workflow_id": "string",
          "workspace_id": "string"
        },
        "coordination_channel_id": "string",
        "ended_at": "2019-08-24T14:15:22Z",
        "error": "string",
        "heartbeat_at": "2019-08-24T14:15:22Z",
        "id": "string",
        "lease_until": "2019-08-24T14:15:22Z",
        "max_attempts": 0,
        "queued_at": "2019-08-24T14:15:22Z",
        "session_id": "string",
        "started_at": "2019-08-24T14:15:22Z",
        "status": "queued",
        "task_id": "string"
      },
      "approval_policy": "none",
      "approval_state": "not_required",
      "child_count": 0,
      "closed_at": "2019-08-24T14:15:22Z",
      "created_at": "2019-08-24T14:15:22Z",
      "created_by": {
        "kind": "human",
        "ref": "string"
      },
      "dependencies": [
        {
          "created_at": "2019-08-24T14:15:22Z",
          "depends_on": {
            "id": "string",
            "identifier": "string",
            "owner": {
              "kind": "human",
              "ref": "string"
            },
            "priority": "low",
            "scope": "global",
            "status": "draft",
            "title": "string",
            "workspace_id": "string"
          },
          "depends_on_task_id": "string",
          "kind": "blocks",
          "task_id": "string"
        }
      ],
      "dependency_count": 0,
      "draft": true,
      "id": "string",
      "identifier": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "max_attempts": 0,
      "network_channel": "string",
      "origin": {
        "kind": "cli",
        "ref": "string"
      },
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "parent_task_id": "string",
      "priority": "low",
      "scope": "global",
      "status": "draft",
      "title": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "workspace_id": "string"
    },
    "task": {
      "approval_policy": "none",
      "approval_state": "not_required",
      "closed_at": "2019-08-24T14:15:22Z",
      "created_at": "2019-08-24T14:15:22Z",
      "created_by": {
        "kind": "human",
        "ref": "string"
      },
      "description": "string",
      "draft": true,
      "id": "string",
      "identifier": "string",
      "max_attempts": 0,
      "metadata": null,
      "network_channel": "string",
      "origin": {
        "kind": "cli",
        "ref": "string"
      },
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "parent_task_id": "string",
      "priority": "low",
      "scope": "global",
      "status": "draft",
      "title": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "workspace_id": "string"
    }
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Publish one draft task and enqueue executable work

POST/api/tasks/{id}/publish

Path Parameters

id*string

Task id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/tasks/string/publish" \  -H "Content-Type: application/json" \  -d '{}'
{
  "run": {
    "attempt": 0,
    "claim_token_hash": "string",
    "claimed_at": "2019-08-24T14:15:22Z",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "ended_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "idempotency_key": "string",
    "lease_until": "2019-08-24T14:15:22Z",
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "queued_at": "2019-08-24T14:15:22Z",
    "result": null,
    "session_id": "string",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "queued",
    "task_id": "string"
  },
  "task": {
    "approval_policy": "none",
    "approval_state": "not_required",
    "closed_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
      "kind": "human",
      "ref": "string"
    },
    "description": "string",
    "draft": true,
    "id": "string",
    "identifier": "string",
    "max_attempts": 0,
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "owner": {
      "kind": "human",
      "ref": "string"
    },
    "parent_task_id": "string",
    "priority": "low",
    "scope": "global",
    "status": "draft",
    "title": "string",
    "updated_at": "2019-08-24T14:15:22Z",
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Reject one approval-gated task

POST/api/tasks/{id}/reject

Path Parameters

id*string

Task id

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/tasks/string/reject"
{
  "task": {
    "approval_policy": "none",
    "approval_state": "not_required",
    "closed_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
      "kind": "human",
      "ref": "string"
    },
    "description": "string",
    "draft": true,
    "id": "string",
    "identifier": "string",
    "max_attempts": 0,
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "owner": {
      "kind": "human",
      "ref": "string"
    },
    "parent_task_id": "string",
    "priority": "low",
    "scope": "global",
    "status": "draft",
    "title": "string",
    "updated_at": "2019-08-24T14:15:22Z",
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

List runs for one task

GET/api/tasks/{id}/runs

Path Parameters

id*string

Task id

Query Parameters

status?string

Filter by run status

Value in"queued" | "claimed" | "starting" | "running" | "completed" | "failed" | "canceled"
session_id?string

Filter by attached session id

limit?integer

Maximum number of records to return

Formatint32

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/tasks/string/runs"
{
  "runs": [
    {
      "attempt": 0,
      "claim_token_hash": "string",
      "claimed_at": "2019-08-24T14:15:22Z",
      "claimed_by": {
        "kind": "human",
        "ref": "string"
      },
      "coordination_channel": {
        "allowed_message_kinds": [
          "status"
        ],
        "channel": "string",
        "display_name": "string",
        "id": "string",
        "last_activity_at": "2019-08-24T14:15:22Z",
        "purpose": "string",
        "run_id": "string",
        "task_id": "string",
        "workflow_id": "string",
        "workspace_id": "string"
      },
      "coordination_channel_id": "string",
      "ended_at": "2019-08-24T14:15:22Z",
      "error": "string",
      "heartbeat_at": "2019-08-24T14:15:22Z",
      "id": "string",
      "idempotency_key": "string",
      "lease_until": "2019-08-24T14:15:22Z",
      "metadata": null,
      "network_channel": "string",
      "origin": {
        "kind": "cli",
        "ref": "string"
      },
      "queued_at": "2019-08-24T14:15:22Z",
      "result": null,
      "session_id": "string",
      "started_at": "2019-08-24T14:15:22Z",
      "status": "queued",
      "task_id": "string"
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Enqueue one task run

POST/api/tasks/{id}/runs

Path Parameters

id*string

Task id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/tasks/string/runs" \  -H "Content-Type: application/json" \  -d '{}'
{
  "run": {
    "attempt": 0,
    "claim_token_hash": "string",
    "claimed_at": "2019-08-24T14:15:22Z",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "ended_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "idempotency_key": "string",
    "lease_until": "2019-08-24T14:15:22Z",
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "queued_at": "2019-08-24T14:15:22Z",
    "result": null,
    "session_id": "string",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "queued",
    "task_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Start one task by enqueueing executable work

POST/api/tasks/{id}/start

Path Parameters

id*string

Task id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/tasks/string/start" \  -H "Content-Type: application/json" \  -d '{}'
{
  "run": {
    "attempt": 0,
    "claim_token_hash": "string",
    "claimed_at": "2019-08-24T14:15:22Z",
    "claimed_by": {
      "kind": "human",
      "ref": "string"
    },
    "coordination_channel": {
      "allowed_message_kinds": [
        "status"
      ],
      "channel": "string",
      "display_name": "string",
      "id": "string",
      "last_activity_at": "2019-08-24T14:15:22Z",
      "purpose": "string",
      "run_id": "string",
      "task_id": "string",
      "workflow_id": "string",
      "workspace_id": "string"
    },
    "coordination_channel_id": "string",
    "ended_at": "2019-08-24T14:15:22Z",
    "error": "string",
    "heartbeat_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "idempotency_key": "string",
    "lease_until": "2019-08-24T14:15:22Z",
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "queued_at": "2019-08-24T14:15:22Z",
    "result": null,
    "session_id": "string",
    "started_at": "2019-08-24T14:15:22Z",
    "status": "queued",
    "task_id": "string"
  },
  "task": {
    "approval_policy": "none",
    "approval_state": "not_required",
    "closed_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": {
      "kind": "human",
      "ref": "string"
    },
    "description": "string",
    "draft": true,
    "id": "string",
    "identifier": "string",
    "max_attempts": 0,
    "metadata": null,
    "network_channel": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "owner": {
      "kind": "human",
      "ref": "string"
    },
    "parent_task_id": "string",
    "priority": "low",
    "scope": "global",
    "status": "draft",
    "title": "string",
    "updated_at": "2019-08-24T14:15:22Z",
    "workspace_id": "string"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Stream task-native live events for one task

GET/api/tasks/{id}/stream

Path Parameters

id*string

Task id

Query Parameters

after_sequence?integer

Replay events after the supplied task stream sequence

Formatint64

Response Body

text/event-stream

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/tasks/string/stream"
{
  "sequence": 0,
  "timeline": {
    "actor": {
      "kind": "human",
      "ref": "string"
    },
    "event_id": "string",
    "event_type": "string",
    "origin": {
      "kind": "cli",
      "ref": "string"
    },
    "payload": null,
    "run": {
      "attempt": 0,
      "claim_token_hash": "string",
      "claimed_at": "2019-08-24T14:15:22Z",
      "claimed_by": {
        "kind": "human",
        "ref": "string"
      },
      "coordination_channel": {
        "allowed_message_kinds": [
          "status"
        ],
        "channel": "string",
        "display_name": "string",
        "id": "string",
        "last_activity_at": "2019-08-24T14:15:22Z",
        "purpose": "string",
        "run_id": "string",
        "task_id": "string",
        "workflow_id": "string",
        "workspace_id": "string"
      },
      "coordination_channel_id": "string",
      "ended_at": "2019-08-24T14:15:22Z",
      "error": "string",
      "heartbeat_at": "2019-08-24T14:15:22Z",
      "id": "string",
      "lease_until": "2019-08-24T14:15:22Z",
      "max_attempts": 0,
      "queued_at": "2019-08-24T14:15:22Z",
      "session_id": "string",
      "started_at": "2019-08-24T14:15:22Z",
      "status": "queued",
      "task_id": "string"
    },
    "sequence": 0,
    "task": {
      "id": "string",
      "identifier": "string",
      "owner": {
        "kind": "human",
        "ref": "string"
      },
      "priority": "low",
      "scope": "global",
      "status": "draft",
      "title": "string",
      "workspace_id": "string"
    },
    "timestamp": "2019-08-24T14:15:22Z"
  },
  "type": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Get one task timeline

GET/api/tasks/{id}/timeline

Path Parameters

id*string

Task id

Query Parameters

after_sequence?integer

Return only events after the supplied sequence

Formatint64
limit?integer

Maximum number of timeline items to return

Formatint32

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/tasks/string/timeline"
{
  "timeline": [
    {
      "actor": {
        "kind": "human",
        "ref": "string"
      },
      "event_id": "string",
      "event_type": "string",
      "origin": {
        "kind": "cli",
        "ref": "string"
      },
      "payload": null,
      "run": {
        "attempt": 0,
        "claim_token_hash": "string",
        "claimed_at": "2019-08-24T14:15:22Z",
        "claimed_by": {
          "kind": "human",
          "ref": "string"
        },
        "coordination_channel": {
          "allowed_message_kinds": [
            "status"
          ],
          "channel": "string",
          "display_name": "string",
          "id": "string",
          "last_activity_at": "2019-08-24T14:15:22Z",
          "purpose": "string",
          "run_id": "string",
          "task_id": "string",
          "workflow_id": "string",
          "workspace_id": "string"
        },
        "coordination_channel_id": "string",
        "ended_at": "2019-08-24T14:15:22Z",
        "error": "string",
        "heartbeat_at": "2019-08-24T14:15:22Z",
        "id": "string",
        "lease_until": "2019-08-24T14:15:22Z",
        "max_attempts": 0,
        "queued_at": "2019-08-24T14:15:22Z",
        "session_id": "string",
        "started_at": "2019-08-24T14:15:22Z",
        "status": "queued",
        "task_id": "string"
      },
      "sequence": 0,
      "task": {
        "id": "string",
        "identifier": "string",
        "owner": {
          "kind": "human",
          "ref": "string"
        },
        "priority": "low",
        "scope": "global",
        "status": "draft",
        "title": "string",
        "workspace_id": "string"
      },
      "timestamp": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Get one task tree live view

GET/api/tasks/{id}/tree

Path Parameters

id*string

Task id

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/tasks/string/tree"
{
  "tree": {
    "descendants": [
      {
        "active_run": {
          "attempt": 0,
          "claim_token_hash": "string",
          "claimed_at": "2019-08-24T14:15:22Z",
          "claimed_by": {
            "kind": "human",
            "ref": "string"
          },
          "coordination_channel": {
            "allowed_message_kinds": [
              "status"
            ],
            "channel": "string",
            "display_name": "string",
            "id": "string",
            "last_activity_at": "2019-08-24T14:15:22Z",
            "purpose": "string",
            "run_id": "string",
            "task_id": "string",
            "workflow_id": "string",
            "workspace_id": "string"
          },
          "coordination_channel_id": "string",
          "ended_at": "2019-08-24T14:15:22Z",
          "error": "string",
          "heartbeat_at": "2019-08-24T14:15:22Z",
          "id": "string",
          "lease_until": "2019-08-24T14:15:22Z",
          "max_attempts": 0,
          "queued_at": "2019-08-24T14:15:22Z",
          "session_id": "string",
          "started_at": "2019-08-24T14:15:22Z",
          "status": "queued",
          "task_id": "string"
        },
        "child_count": 0,
        "depth": 0,
        "last_activity_at": "2019-08-24T14:15:22Z",
        "parent_task_id": "string",
        "task": {
          "id": "string",
          "identifier": "string",
          "owner": {
            "kind": "human",
            "ref": "string"
          },
          "priority": "low",
          "scope": "global",
          "status": "draft",
          "title": "string",
          "workspace_id": "string"
        }
      }
    ],
    "root": {
      "active_run": {
        "attempt": 0,
        "claim_token_hash": "string",
        "claimed_at": "2019-08-24T14:15:22Z",
        "claimed_by": {
          "kind": "human",
          "ref": "string"
        },
        "coordination_channel": {
          "allowed_message_kinds": [
            "status"
          ],
          "channel": "string",
          "display_name": "string",
          "id": "string",
          "last_activity_at": "2019-08-24T14:15:22Z",
          "purpose": "string",
          "run_id": "string",
          "task_id": "string",
          "workflow_id": "string",
          "workspace_id": "string"
        },
        "coordination_channel_id": "string",
        "ended_at": "2019-08-24T14:15:22Z",
        "error": "string",
        "heartbeat_at": "2019-08-24T14:15:22Z",
        "id": "string",
        "lease_until": "2019-08-24T14:15:22Z",
        "max_attempts": 0,
        "queued_at": "2019-08-24T14:15:22Z",
        "session_id": "string",
        "started_at": "2019-08-24T14:15:22Z",
        "status": "queued",
        "task_id": "string"
      },
      "child_count": 0,
      "depth": 0,
      "last_activity_at": "2019-08-24T14:15:22Z",
      "parent_task_id": "string",
      "task": {
        "id": "string",
        "identifier": "string",
        "owner": {
          "kind": "human",
          "ref": "string"
        },
        "priority": "low",
        "scope": "global",
        "status": "draft",
        "title": "string",
        "workspace_id": "string"
      }
    }
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Archive one task inbox item

POST/api/tasks/{id}/triage/archive

Path Parameters

id*string

Task id

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/tasks/string/triage/archive"
{
  "triage": {
    "actor": {
      "kind": "human",
      "ref": "string"
    },
    "archived": true,
    "dismissed": true,
    "last_seen_activity_at": "2019-08-24T14:15:22Z",
    "read": true,
    "task_id": "string",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Dismiss one task inbox item

POST/api/tasks/{id}/triage/dismiss

Path Parameters

id*string

Task id

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/tasks/string/triage/dismiss"
{
  "triage": {
    "actor": {
      "kind": "human",
      "ref": "string"
    },
    "archived": true,
    "dismissed": true,
    "last_seen_activity_at": "2019-08-24T14:15:22Z",
    "read": true,
    "task_id": "string",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Mark one task inbox item as read

POST/api/tasks/{id}/triage/read

Path Parameters

id*string

Task id

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/tasks/string/triage/read"
{
  "triage": {
    "actor": {
      "kind": "human",
      "ref": "string"
    },
    "archived": true,
    "dismissed": true,
    "last_seen_activity_at": "2019-08-24T14:15:22Z",
    "read": true,
    "task_id": "string",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty