Skip to content

Task API (1.0)

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 section.

Download OpenAPI description
Languages
Servers
Mock server

https://tidepool.redocly.app/_mock/reference/task.v1/

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/

Internal

APIs intended for internal use by Tidepool.

Operations

Tasks

List, create and manage generic background tasks.

Operations

Request

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.

Security
serverToken
Query
namestring(Task Name)

Task Name Filter. Filter by task name

typestring(Task Type)

Task Type Filter. Filter by task type

statestring(Task State)

Task State Filter. Filter by task state

Enum"pending""running""failed""completed"
Example: state=running
pageinteger(int32)(Page Number)>= 0read-only

Page number for pagination

Default 0
Example: page=0
sizeinteger(int32)(Page Size)[ 1 .. 1000 ]read-only

Page size for pagination

Default 100
Example: size=42
curl -i -X GET \
  'https://tidepool.redocly.app/_mock/reference/task.v1/v1/tasks?name=string&type=string&state=running&page=0&size=42' \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'

Responses

Tasks

Bodyapplication/jsonArray [
idstring(Task ID)= 32 characters^[0-9a-f]{32}$
Example: "354b6adc10bc417eb715a8e7b21d6031"
namestring(Task Name)
typestring(Task Type)
priorityinteger(int32)(Task Priority)>= 0
dataobject(Task Data)
availableTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
expirationTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
statestring(Task State)
Enum"pending""running""failed""completed"
Example: "running"
errorstring(Task Error(s))
runTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
durationnumber(Task Duration)>= 0
createdTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
modifiedTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
]
Response
application/json
[ { "id": "354b6adc10bc417eb715a8e7b21d6031", "name": "string", "type": "string", "priority": 0, "data": {}, "availableTime": "2017-02-06T02:37:46Z", "expirationTime": "2017-02-06T02:37:46Z", "state": "running", "error": "string", "runTime": "2017-02-06T02:37:46Z", "duration": 0, "createdTime": "2017-02-06T02:37:46Z", "modifiedTime": "2017-02-06T02:37:46Z" } ]

Request

Creates a new task.

Security
serverToken
Bodyapplication/json
namestring(Task Name)required
typestring(Task Type)required
priorityinteger(int32)(Task Priority)>= 0required
dataobject(Task Data)required
data.​property name*anyadditional property
availableTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
expirationTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
curl -i -X POST \
  https://tidepool.redocly.app/_mock/reference/task.v1/v1/tasks \
  -H 'Content-Type: application/json' \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE' \
  -d '{
    "name": "string",
    "type": "string",
    "priority": 0,
    "data": {},
    "availableTime": "2017-02-06T02:37:46Z",
    "expirationTime": "2017-02-06T02:37:46Z"
  }'

Responses

Task

Bodyapplication/json
idstring(Task ID)= 32 characters^[0-9a-f]{32}$
Example: "354b6adc10bc417eb715a8e7b21d6031"
namestring(Task Name)
typestring(Task Type)
priorityinteger(int32)(Task Priority)>= 0
dataobject(Task Data)
availableTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
expirationTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
statestring(Task State)
Enum"pending""running""failed""completed"
Example: "running"
errorstring(Task Error(s))
runTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
durationnumber(Task Duration)>= 0
createdTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
modifiedTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
Response
application/json
{ "id": "354b6adc10bc417eb715a8e7b21d6031", "name": "string", "type": "string", "priority": 0, "data": {}, "availableTime": "2017-02-06T02:37:46Z", "expirationTime": "2017-02-06T02:37:46Z", "state": "running", "error": "string", "runTime": "2017-02-06T02:37:46Z", "duration": 0, "createdTime": "2017-02-06T02:37:46Z", "modifiedTime": "2017-02-06T02:37:46Z" }

Request

Returns the task identified by taskId.

Security
serverToken
Path
taskIdstring(Task ID)= 32 characters^[0-9a-f]{32}$required

Task ID

Example: 354b6adc10bc417eb715a8e7b21d6031
curl -i -X GET \
  https://tidepool.redocly.app/_mock/reference/task.v1/v1/tasks/354b6adc10bc417eb715a8e7b21d6031 \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'

Responses

Task

Bodyapplication/json
idstring(Task ID)= 32 characters^[0-9a-f]{32}$
Example: "354b6adc10bc417eb715a8e7b21d6031"
namestring(Task Name)
typestring(Task Type)
priorityinteger(int32)(Task Priority)>= 0
dataobject(Task Data)
availableTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
expirationTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
statestring(Task State)
Enum"pending""running""failed""completed"
Example: "running"
errorstring(Task Error(s))
runTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
durationnumber(Task Duration)>= 0
createdTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
modifiedTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
Response
application/json
{ "id": "354b6adc10bc417eb715a8e7b21d6031", "name": "string", "type": "string", "priority": 0, "data": {}, "availableTime": "2017-02-06T02:37:46Z", "expirationTime": "2017-02-06T02:37:46Z", "state": "running", "error": "string", "runTime": "2017-02-06T02:37:46Z", "duration": 0, "createdTime": "2017-02-06T02:37:46Z", "modifiedTime": "2017-02-06T02:37:46Z" }

Request

Updates the task identified by taskId.

Security
serverToken
Path
taskIdstring(Task ID)= 32 characters^[0-9a-f]{32}$required

Task ID

Example: 354b6adc10bc417eb715a8e7b21d6031
Bodyapplication/json
priorityinteger(int32)(Task Priority)>= 0required
dataobject(Task Data)required
data.​property name*anyadditional property
availableTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
expirationTimestring(date-time)(Date/Time)required

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
curl -i -X PUT \
  https://tidepool.redocly.app/_mock/reference/task.v1/v1/tasks/354b6adc10bc417eb715a8e7b21d6031 \
  -H 'Content-Type: application/json' \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE' \
  -d '{
    "priority": 0,
    "data": {},
    "availableTime": "2017-02-06T02:37:46Z",
    "expirationTime": "2017-02-06T02:37:46Z"
  }'

Responses

Task

Bodyapplication/json
idstring(Task ID)= 32 characters^[0-9a-f]{32}$
Example: "354b6adc10bc417eb715a8e7b21d6031"
namestring(Task Name)
typestring(Task Type)
priorityinteger(int32)(Task Priority)>= 0
dataobject(Task Data)
availableTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
expirationTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
statestring(Task State)
Enum"pending""running""failed""completed"
Example: "running"
errorstring(Task Error(s))
runTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
durationnumber(Task Duration)>= 0
createdTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
modifiedTimestring(date-time)(Date/Time)

RFC 3339 / ISO 8601 timestamp with timezone information

Example: "2017-02-06T02:37:46Z"
Response
application/json
{ "id": "354b6adc10bc417eb715a8e7b21d6031", "name": "string", "type": "string", "priority": 0, "data": {}, "availableTime": "2017-02-06T02:37:46Z", "expirationTime": "2017-02-06T02:37:46Z", "state": "running", "error": "string", "runTime": "2017-02-06T02:37:46Z", "duration": 0, "createdTime": "2017-02-06T02:37:46Z", "modifiedTime": "2017-02-06T02:37:46Z" }

Request

Deletes the task identified by taskId.

Security
serverToken
Path
taskIdstring(Task ID)= 32 characters^[0-9a-f]{32}$required

Task ID

Example: 354b6adc10bc417eb715a8e7b21d6031
curl -i -X DELETE \
  https://tidepool.redocly.app/_mock/reference/task.v1/v1/tasks/354b6adc10bc417eb715a8e7b21d6031 \
  -H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'

Responses

Success

Response
No content