Get a task's status and result
GET
/api/v1/agents/{role}/tasks/{task_id}
const url = 'https://api.ultimateteam.ai/api/v1/agents/example/tasks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.ultimateteam.ai/api/v1/agents/example/tasks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'X-API-Key: <X-API-Key>'Fetch a single AgentTask by ID, tenant-scoped.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”role
required
Role
The agent role the task belongs to
string
The agent role the task belongs to
task_id
required
Task Id
The task ID to fetch
string format: uuid
The task ID to fetch
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
AgentTaskResponse
Wrapper response for GET /agents/{role}/tasks/{task_id}.
Attributes: data: The task payload.
object
data
required
AgentTaskData
Payload returned by GET /agents/{role}/tasks/{task_id}.
Attributes: task_id: The task’s ID. agent_role: The agent role the task belongs to. task_type: The type of task. status: Current task status (e.g. pending/completed/failed). input: The task’s input payload. output: The task’s output payload, populated once completed. error: Error message, populated if the task failed.
Examplegenerated
{ "data": { "agent_role": "example", "error": "example", "input": {}, "output": {}, "status": "example", "task_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "task_type": "example" }}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}