# Updates

These are a collection of endpoints that allow you to view Bird related updates.

# Download Update

TIP

By default, your Birds will automatically update. Downloading an update would only be useful if you've disabled remote updates on a specific Bird.

GET /api/v1/update/fetch

Downloads a specified update.

Required Parameters

auth_token string
A valid auth token
update_tag string
A valid update tag

Response

A JSON Structure of Birds pending commissions.

Example

curl https://EXAMPLE.canary.tools/api/v1/update/fetch \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -d update_tag=EXAMPLE_UPDATE_TAG \
  -G -O -J
Copied!
1
2
3
4
Response
{
  "result": "success",
}
Copied!
1
2
3

# List Updatable Birds

GET /api/v1/update/updatable_birds

Retrieve a list of updatable Birds.

Required Parameters

auth_token string
A valid auth token

Optional Parameters

flock_id string
A valid flock_id

Response

A JSON structure with the list of Birds that are currently updatable.

Example

curl https://EXAMPLE.canary.tools/api/v1/update/updatable_birds \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -G
Copied!
1
2
3
Response
{
  "automatic_updates_enabled": true,
  "result": "success",
  "updatable_devices": null
}
Copied!
1
2
3
4
5

# List Updating Birds

GET /api/v1/update/updating_devices

Retrieve a list of currently updating Birds.

Required Parameters

auth_token string
A valid auth token

Optional Parameters

flock_id string
Defaults to: 'flock:default'
ID of the flock to assign the Bird to (defaults to the Default Flock).

Response

A JSON structure with the list of Birds that are currently updating.

Example

curl https://EXAMPLE.canary.tools/api/v1/update/updating_devices \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -G
Copied!
1
2
3
Response
{
  "result": "success",
  "updating_devices": []
}
Copied!
1
2
3
4

# List Updates

GET /api/v1/updates/list

Retrieve a list of available updates.

Required Parameters

auth_token string
A valid auth token

Response

A JSON structure with the list of available updates.

Example

curl https://EXAMPLE.canary.tools/api/v1/updates/list \
  -d auth_token=EXAMPLE_AUTH_TOKEN \
  -G
Copied!
1
2
3
Response
{
  "updates": [
    {
      "description": "Fix to Canary sandbox configuration",
      "filename": "canary_2.3.1_prod.upd",
      "ignore": false,
      "supported_versions": [
        "2.3"
      ],
      "tag": "<update_tag>",
      "target_sensors": [
        "rpi3_jessie"
      ],
      "version": "2.3.1"
    },
    ...
  ]
}
Copied!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18