Testing
These are a collection of endpoints that allow you to test connectivity with your Console.
Ping
GET /api/v1/ping
A simple endpoint to test if the API is reachable.
Required Parameters
auth_token string
A valid auth token
Response
A JSON message with a result indicator.
Example
curl https://EXAMPLE.canary.tools/api/v1/ping \
-d auth_token=EXAMPLE_AUTH_TOKEN \
-G
1
2
3
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/ping'
payload = {
'auth_token': 'EXAMPLE_AUTH_TOKEN'
}
r = requests.get(url, params=payload)
print(r.json())
1
2
3
4
5
6
7
8
9
10
11
{
"result": "success"
}
1
2
3
Send Fake Syslog Alerts
POST /api/v1/syslog/fake_alert/<incident_count>
Send fake alerts to your syslog setup.
Required Parameters
auth_token string
A valid auth token
Optional Parameters
alert_all_devices boolean
Create a fake alert for all Birds connected to your Console
Response
A JSON message with a result indicator.
Example
curl https://EXAMPLE.canary.tools/api/v1/syslog/fake_alert/1 \
-d auth_token=EXAMPLE_AUTH_TOKEN \
1
2
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/syslog/fake_alert/1'
payload = {
'auth_token': 'EXAMPLE_AUTH_TOKEN'
}
r = requests.post(url, params=payload)
print(r.json())
1
2
3
4
5
6
7
8
9
10
11
{
"result": "success"
}
1
2
3
Send Syslog Test Message
POST /api/v1/syslog/test
Test your Syslog setup by sending a dummy test message.
Required Parameters
auth_token string
A valid auth token
Response
A JSON message with a result indicator.
Example
curl https://EXAMPLE.canary.tools/api/v1/syslog/test \
-d auth_token=EXAMPLE_AUTH_TOKEN
1
2
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/syslog/test'
payload = {
'auth_token': 'EXAMPLE_AUTH_TOKEN'
}
r = requests.post(url, params=payload)
print(r.json())
1
2
3
4
5
6
7
8
9
10
11
{
"result": "success"
}
1
2
3