# Tracker

## Get Agent Task Tracker

**get** `/tracker/{tracker_id}`

Get agent task tracker by tracker ID

### Path Parameters

- `tracker_id: string`

### Returns

- `AgentTaskTracker object { id, agent_id, created_at, 5 more }`

  - `id: string`

    The UUID of the agent task tracker

  - `agent_id: string`

    The UUID of the agent

  - `created_at: string`

    When the agent task tracker was created

  - `task_id: string`

    The UUID of the task

  - `last_processed_event_id: optional string`

    The last processed event ID

  - `status: optional string`

    Processing status

  - `status_reason: optional string`

    Optional status reason

  - `updated_at: optional string`

    When the agent task tracker was last updated

### Example

```http
curl http://localhost:5003/tracker/$TRACKER_ID \
    -H "Authorization: Bearer $AGENTEX_SDK_API_KEY"
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "task_id": "task_id",
  "last_processed_event_id": "last_processed_event_id",
  "status": "status",
  "status_reason": "status_reason",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Update Agent Task Tracker

**put** `/tracker/{tracker_id}`

Update agent task tracker by tracker ID

### Path Parameters

- `tracker_id: string`

### Body Parameters

- `last_processed_event_id: optional string`

  The most recent processed event ID (omit to leave unchanged)

- `status: optional string`

  Processing status

- `status_reason: optional string`

  Optional status reason

### Returns

- `AgentTaskTracker object { id, agent_id, created_at, 5 more }`

  - `id: string`

    The UUID of the agent task tracker

  - `agent_id: string`

    The UUID of the agent

  - `created_at: string`

    When the agent task tracker was created

  - `task_id: string`

    The UUID of the task

  - `last_processed_event_id: optional string`

    The last processed event ID

  - `status: optional string`

    Processing status

  - `status_reason: optional string`

    Optional status reason

  - `updated_at: optional string`

    When the agent task tracker was last updated

### Example

```http
curl http://localhost:5003/tracker/$TRACKER_ID \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $AGENTEX_SDK_API_KEY" \
    -d '{}'
```

#### Response

```json
{
  "id": "id",
  "agent_id": "agent_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "task_id": "task_id",
  "last_processed_event_id": "last_processed_event_id",
  "status": "status",
  "status_reason": "status_reason",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## List Agent Task Trackers

**get** `/tracker`

List all agent task trackers, optionally filtered by query parameters.

### Query Parameters

- `agent_id: optional string`

  Agent ID

- `limit: optional number`

  Limit

- `order_by: optional string`

  Field to order by

- `order_direction: optional string`

  Order direction (asc or desc)

- `page_number: optional number`

  Page number

- `task_id: optional string`

  Task ID

### Returns

- `id: string`

  The UUID of the agent task tracker

- `agent_id: string`

  The UUID of the agent

- `created_at: string`

  When the agent task tracker was created

- `task_id: string`

  The UUID of the task

- `last_processed_event_id: optional string`

  The last processed event ID

- `status: optional string`

  Processing status

- `status_reason: optional string`

  Optional status reason

- `updated_at: optional string`

  When the agent task tracker was last updated

### Example

```http
curl http://localhost:5003/tracker \
    -H "Authorization: Bearer $AGENTEX_SDK_API_KEY"
```

#### Response

```json
[
  {
    "id": "id",
    "agent_id": "agent_id",
    "created_at": "2019-12-27T18:11:19.117Z",
    "task_id": "task_id",
    "last_processed_event_id": "last_processed_event_id",
    "status": "status",
    "status_reason": "status_reason",
    "updated_at": "2019-12-27T18:11:19.117Z"
  }
]
```

## Domain Types

### Agent Task Tracker

- `AgentTaskTracker object { id, agent_id, created_at, 5 more }`

  - `id: string`

    The UUID of the agent task tracker

  - `agent_id: string`

    The UUID of the agent

  - `created_at: string`

    When the agent task tracker was created

  - `task_id: string`

    The UUID of the task

  - `last_processed_event_id: optional string`

    The last processed event ID

  - `status: optional string`

    Processing status

  - `status_reason: optional string`

    Optional status reason

  - `updated_at: optional string`

    When the agent task tracker was last updated

### Tracker List Response

- `TrackerListResponse = array of AgentTaskTracker`

  - `id: string`

    The UUID of the agent task tracker

  - `agent_id: string`

    The UUID of the agent

  - `created_at: string`

    When the agent task tracker was created

  - `task_id: string`

    The UUID of the task

  - `last_processed_event_id: optional string`

    The last processed event ID

  - `status: optional string`

    Processing status

  - `status_reason: optional string`

    Optional status reason

  - `updated_at: optional string`

    When the agent task tracker was last updated
