> For the complete documentation index, see [llms.txt](https://atoma.gitbook.io/atoma-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://atoma.gitbook.io/atoma-docs/node-operators/atoma-node/atoma-node-daemon/task-management.md).

# Task Management

## Task Management

**Get All Tasks**

```
GET /tasks
```

Returns all available tasks from the state manager.

**Response Status Codes**

* `200 OK`: Successfully retrieved tasks
* `500 Internal Server Error`: Failed to retrieve tasks from state manager

**Response**

Returns an array of Task objects:

```json
[
  {
    "task_small_id": 1,
    "task_id": "task-123",
    "role": 1,
    "model_name": "gpt-4",
    "is_deprecated": false,
    "valid_until_epoch": null,
    "deprecated_at_epoch": null,
    "security_level": 1,
    "minimum_reputation_score": 100
  }
]
```

**Response Fields**

* `task_small_id` (integer): Unique small integer identifier for the task
* `task_id` (string): Unique string identifier for the task
* `role` (integer): Role associated with the task
* `model_name` (string, optional): Name of the model used for the task
* `is_deprecated` (boolean): Whether the task is deprecated
* `valid_until_epoch` (integer, optional): Epoch timestamp until which the task is valid
* `deprecated_at_epoch` (integer, optional): Epoch timestamp when the task was deprecated
* `security_level` (integer): Security level of the task
* `minimum_reputation_score` (integer, optional): Minimum reputation score required for the task

**Example Error Response**

```json
{
  "error": "Failed to get all tasks"
}
```

**Notes**

* This endpoint retrieves all tasks regardless of their deprecation status
* Tasks are returned in no particular order
* Null values for optional fields indicate that they are not set
