# Task API

The Tidepool API is an HTTP REST API used by Tidepool clients use to communicate with the Tidepool Platform.

For more information, see the [Getting Started](../docs/quick-start.md) section.

Version: 1.0
License: BSD-2-Clause

## Servers

integration
```
https://external.integration.tidepool.org
```

production
```
https://api.tidepool.org
```

dev1
```
https://dev1.dev.tidepool.org
```

qa1
```
https://qa1.development.tidepool.org
```

qa2
```
https://qa2.development.tidepool.org
```

## Security

### serverToken

Tidepool Server Token

Type: apiKey
In: header
Name: X-Tidepool-Session-Token

## Download OpenAPI description

[Task API](https://dev-docs.tidepool.org/_bundle/reference/task.v1.yaml)

## Tasks

List, create and manage generic background tasks.

### List Tasks

 - [GET /v1/tasks](https://dev-docs.tidepool.org/reference/task.v1/internal/listtasks.md): Returns list of tasks. The list can be filtered with the name, type, or state query parameters. It can also be paginated with the page and size query parameters.

### Create New Task

 - [POST /v1/tasks](https://dev-docs.tidepool.org/reference/task.v1/internal/createtask.md): Creates a new task.

### Get Task

 - [GET /v1/tasks/{taskId}](https://dev-docs.tidepool.org/reference/task.v1/internal/gettask.md): Returns the task identified by taskId.

### Update Task

 - [PUT /v1/tasks/{taskId}](https://dev-docs.tidepool.org/reference/task.v1/internal/updatetask.md): Updates the task identified by taskId.

### Delete Task

 - [DELETE /v1/tasks/{taskId}](https://dev-docs.tidepool.org/reference/task.v1/internal/deletetask.md): Deletes the task identified by taskId.

### List Tasks

 - [GET /v1/tasks](https://dev-docs.tidepool.org/reference/task.v1/tasks/listtasks.md): Returns list of tasks. The list can be filtered with the name, type, or state query parameters. It can also be paginated with the page and size query parameters.

### Create New Task

 - [POST /v1/tasks](https://dev-docs.tidepool.org/reference/task.v1/tasks/createtask.md): Creates a new task.

### Get Task

 - [GET /v1/tasks/{taskId}](https://dev-docs.tidepool.org/reference/task.v1/tasks/gettask.md): Returns the task identified by taskId.

### Update Task

 - [PUT /v1/tasks/{taskId}](https://dev-docs.tidepool.org/reference/task.v1/tasks/updatetask.md): Updates the task identified by taskId.

### Delete Task

 - [DELETE /v1/tasks/{taskId}](https://dev-docs.tidepool.org/reference/task.v1/tasks/deletetask.md): Deletes the task identified by taskId.

## Internal

APIs intended for internal use by Tidepool.

### List Tasks

 - [GET /v1/tasks](https://dev-docs.tidepool.org/reference/task.v1/internal/listtasks.md): Returns list of tasks. The list can be filtered with the name, type, or state query parameters. It can also be paginated with the page and size query parameters.

### Create New Task

 - [POST /v1/tasks](https://dev-docs.tidepool.org/reference/task.v1/internal/createtask.md): Creates a new task.

### Get Task

 - [GET /v1/tasks/{taskId}](https://dev-docs.tidepool.org/reference/task.v1/internal/gettask.md): Returns the task identified by taskId.

### Update Task

 - [PUT /v1/tasks/{taskId}](https://dev-docs.tidepool.org/reference/task.v1/internal/updatetask.md): Updates the task identified by taskId.

### Delete Task

 - [DELETE /v1/tasks/{taskId}](https://dev-docs.tidepool.org/reference/task.v1/internal/deletetask.md): Deletes the task identified by taskId.

### List Tasks

 - [GET /v1/tasks](https://dev-docs.tidepool.org/reference/task.v1/tasks/listtasks.md): Returns list of tasks. The list can be filtered with the name, type, or state query parameters. It can also be paginated with the page and size query parameters.

### Create New Task

 - [POST /v1/tasks](https://dev-docs.tidepool.org/reference/task.v1/tasks/createtask.md): Creates a new task.

### Get Task

 - [GET /v1/tasks/{taskId}](https://dev-docs.tidepool.org/reference/task.v1/tasks/gettask.md): Returns the task identified by taskId.

### Update Task

 - [PUT /v1/tasks/{taskId}](https://dev-docs.tidepool.org/reference/task.v1/tasks/updatetask.md): Updates the task identified by taskId.

### Delete Task

 - [DELETE /v1/tasks/{taskId}](https://dev-docs.tidepool.org/reference/task.v1/tasks/deletetask.md): Deletes the task identified by taskId.

