Canary Limits
Canary limits let you cap how many Birds can be commissioned into a given Flock.
Enable Flock Canary Limit
POST /api/v1/flock/settings/devices/limit/enable
Enable Canary limits for a Flock. If the limit is already set, the current limit is unchanged.
Required Parameters
auth_token string
A valid global admin auth token
flock_id string
A valid flock_id
Response
A JSON structure with result indicator and the current limit.
Example
curl https://EXAMPLE.canary.tools/api/v1/flock/settings/devices/limit/enable \
-d auth_token=EXAMPLE_AUTH_TOKEN \
-d flock_id=EXAMPLE_FLOCK_ID
1
2
3
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/devices/limit/enable'
payload = {
'auth_token': 'EXAMPLE_AUTH_TOKEN',
'flock_id': 'EXAMPLE_FLOCK_ID'
}
r = requests.post(url, data=payload)
print(r.json())
1
2
3
4
5
6
7
8
9
10
11
12
{
"limit": 5,
"result": "success"
}
1
2
3
4
Disable Flock Canary Limit
POST /api/v1/flock/settings/devices/limit/disable
Disable Canary limits for a Flock.
Required Parameters
auth_token string
A valid global admin auth token
flock_id string
A valid flock_id
Response
A JSON structure with result indicator.
Example
curl https://EXAMPLE.canary.tools/api/v1/flock/settings/devices/limit/disable \
-d auth_token=EXAMPLE_AUTH_TOKEN \
-d flock_id=EXAMPLE_FLOCK_ID
1
2
3
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/devices/limit/disable'
payload = {
'auth_token': 'EXAMPLE_AUTH_TOKEN',
'flock_id': 'EXAMPLE_FLOCK_ID'
}
r = requests.post(url, data=payload)
print(r.json())
1
2
3
4
5
6
7
8
9
10
11
12
{
"result": "success"
}
1
2
3
Set Flock Canary Limit
POST /api/v1/flock/settings/devices/limit/set
Set the current Canary limit for a Flock.
Required Parameters
auth_token string
A valid global admin auth token
flock_id string
A valid flock_id
limit integer
A non-negative integer limit to set for the Flock
Response
A JSON structure with result indicator.
Example
curl https://EXAMPLE.canary.tools/api/v1/flock/settings/devices/limit/set \
-d auth_token=EXAMPLE_AUTH_TOKEN \
-d flock_id=EXAMPLE_FLOCK_ID \
-d limit=5
1
2
3
4
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/devices/limit/set'
payload = {
'auth_token': 'EXAMPLE_AUTH_TOKEN',
'flock_id': 'EXAMPLE_FLOCK_ID',
'limit': 5
}
r = requests.post(url, data=payload)
print(r.json())
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"result": "success"
}
1
2
3
Get Flock Canary Limit
GET /api/v1/flock/settings/devices/limit
Fetch the current Canary limit for a Flock.
Required Parameters
auth_token string
A valid auth token
flock_id string
A valid flock_id
Response
A JSON structure with the current limit ('null' if the limit is disabled).
Example
curl https://EXAMPLE.canary.tools/api/v1/flock/settings/devices/limit \
-d auth_token=EXAMPLE_AUTH_TOKEN \
-d flock_id=EXAMPLE_FLOCK_ID \
-G
1
2
3
4
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/devices/limit'
payload = {
'auth_token': 'EXAMPLE_AUTH_TOKEN',
'flock_id': 'EXAMPLE_FLOCK_ID'
}
r = requests.get(url, params=payload)
print(r.json())
1
2
3
4
5
6
7
8
9
10
11
12
{
"limit": 5,
"result": "success"
}
1
2
3
4