Skip to content

Update Task

Request

Updates the task identified by taskId.

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

Task ID

Example:354b6adc10bc417eb715a8e7b21d6031
Bodyapplication/json
priorityinteger, (int32), >= 0(Task Priority)required
dataobject(Task Data)required
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, = 32 characters(Task ID)^[0-9a-f]{32}$
Example:"354b6adc10bc417eb715a8e7b21d6031"
namestring(Task Name)
typestring(Task Type)
priorityinteger, (int32), >= 0(Task Priority)
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, >= 0(Task Duration)
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
{ "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" }