Skip to content

Fetch an alert

GET
/alerts/{alert_id}
curl --request GET \
--url https://api.canaro.ca/external/v1/alerts/1 \
--header 'Authorization: Bearer <token>'

Fetch one alert of the workspace by its id.

alert_id
required
Alert Id
integer

Successful Response

Media typeapplication/json
Alert

One incident of a rule firing.

Called an alert, not an incident: incident already names a different thing on this platform, the entries on the public status page.

object
acknowledged_at
Any of:
string format: date-time
alert_id
required
Alert Id

Stable identifier; use it to fetch this alert.

integer
condition
Any of:
string
device_id
required
Device Id
string
fire_count
required
Fire Count

How many times the rule has fired on this alert.

integer
kind
required
Kind

The rule type that fired.

string
opened_at
required
Opened At
string format: date-time
resolved_at
Any of:
string format: date-time
rule_name
Any of:
string
sensor
Any of:
string
status
required
Status

Open, acknowledged or resolved.

string
threshold
Any of:
number
value
Any of:
number
Example
6.2
X-RateLimit-Limit
integer

Requests allowed in the window this response was counted against.

X-RateLimit-Remaining
integer

Requests left in that window. A refusal costs no allowance.

The key is missing, unknown, revoked or expired.

Media typeapplication/json
ErrorResponse

Every non-success response the external API produces.

object
error
required
Error

What a refusal says. code is drawn from one declared set; per-code members such as required_scope and max_days are additive.

object
code
required
Code

Machine-readable reason, from the published set.

string
message
required
Message

What went wrong, in words.

string
key
additional properties
any
Example
{
"error": {
"code": "insufficient_scope",
"message": "This key does not hold devices:read.",
"required_scope": "devices:read"
}
}
WWW-Authenticate
string

Always Bearer.

X-RateLimit-Limit
integer

Requests allowed in the window this response was counted against.

X-RateLimit-Remaining
integer

Requests left in that window. A refusal costs no allowance.

The plan grants no external API access, or the key lacks the required scope.

Media typeapplication/json
ErrorResponse

Every non-success response the external API produces.

object
error
required
Error

What a refusal says. code is drawn from one declared set; per-code members such as required_scope and max_days are additive.

object
code
required
Code

Machine-readable reason, from the published set.

string
message
required
Message

What went wrong, in words.

string
key
additional properties
any
Example
{
"error": {
"code": "insufficient_scope",
"message": "This key does not hold devices:read.",
"required_scope": "devices:read"
}
}
X-RateLimit-Limit
integer

Requests allowed in the window this response was counted against.

X-RateLimit-Remaining
integer

Requests left in that window. A refusal costs no allowance.

No such resource in this key’s workspace, or no such endpoint.

Media typeapplication/json
ErrorResponse

Every non-success response the external API produces.

object
error
required
Error

What a refusal says. code is drawn from one declared set; per-code members such as required_scope and max_days are additive.

object
code
required
Code

Machine-readable reason, from the published set.

string
message
required
Message

What went wrong, in words.

string
key
additional properties
any
Example
{
"error": {
"code": "insufficient_scope",
"message": "This key does not hold devices:read.",
"required_scope": "devices:read"
}
}
X-RateLimit-Limit
integer

Requests allowed in the window this response was counted against.

X-RateLimit-Remaining
integer

Requests left in that window. A refusal costs no allowance.

That method is not allowed on this endpoint.

Media typeapplication/json
ErrorResponse

Every non-success response the external API produces.

object
error
required
Error

What a refusal says. code is drawn from one declared set; per-code members such as required_scope and max_days are additive.

object
code
required
Code

Machine-readable reason, from the published set.

string
message
required
Message

What went wrong, in words.

string
key
additional properties
any
Example
{
"error": {
"code": "insufficient_scope",
"message": "This key does not hold devices:read.",
"required_scope": "devices:read"
}
}
X-RateLimit-Limit
integer

Requests allowed in the window this response was counted against.

X-RateLimit-Remaining
integer

Requests left in that window. A refusal costs no allowance.

The request could not be understood, or its time range is too wide.

Media typeapplication/json
ErrorResponse

Every non-success response the external API produces.

object
error
required
Error

What a refusal says. code is drawn from one declared set; per-code members such as required_scope and max_days are additive.

object
code
required
Code

Machine-readable reason, from the published set.

string
message
required
Message

What went wrong, in words.

string
key
additional properties
any
Example
{
"error": {
"code": "insufficient_scope",
"message": "This key does not hold devices:read.",
"required_scope": "devices:read"
}
}
X-RateLimit-Limit
integer

Requests allowed in the window this response was counted against.

X-RateLimit-Remaining
integer

Requests left in that window. A refusal costs no allowance.

The workspace’s external allowance is spent.

Media typeapplication/json
ErrorResponse

Every non-success response the external API produces.

object
error
required
Error

What a refusal says. code is drawn from one declared set; per-code members such as required_scope and max_days are additive.

object
code
required
Code

Machine-readable reason, from the published set.

string
message
required
Message

What went wrong, in words.

string
key
additional properties
any
Example
{
"error": {
"code": "insufficient_scope",
"message": "This key does not hold devices:read.",
"required_scope": "devices:read"
}
}
Retry-After
integer

Whole seconds to wait before retrying. Never less than one.

X-RateLimit-Limit
integer

Requests allowed in the window this response was counted against.

X-RateLimit-Remaining
integer

Requests left in that window. A refusal costs no allowance.

Something went wrong on our side.

Media typeapplication/json
ErrorResponse

Every non-success response the external API produces.

object
error
required
Error

What a refusal says. code is drawn from one declared set; per-code members such as required_scope and max_days are additive.

object
code
required
Code

Machine-readable reason, from the published set.

string
message
required
Message

What went wrong, in words.

string
key
additional properties
any
Example
{
"error": {
"code": "insufficient_scope",
"message": "This key does not hold devices:read.",
"required_scope": "devices:read"
}
}
X-RateLimit-Limit
integer

Requests allowed in the window this response was counted against.

X-RateLimit-Remaining
integer

Requests left in that window. A refusal costs no allowance.