Fetch the workspace account
const url = 'https://api.canaro.ca/external/v1/account';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.canaro.ca/external/v1/account \ --header 'Authorization: Bearer <token>'The workspace this key acts in: its plan, its allowances and what it currently holds.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Successful Response
The workspace’s own facts.
Deliberately carries no member data: no name, email address, phone number, verification or consent state, role, site restriction or member list. Those belong to people, not to a workspace.
object
The workspace’s plan, as far as it shapes a caller’s own behaviour.
object
This API’s daily allowance.
This API’s burst allowance.
How many live keys this workspace may hold.
The largest page size this API accepts.
The tier identifier.
What the workspace currently holds.
object
Devices in the workspace.
Alerts not yet resolved.
Example
{ "name": "Northfield Agriculture", "plan": { "external_requests_per_day": 25000, "external_requests_per_minute": 60, "history_max_days": 365, "max_api_keys": 5, "max_devices_per_page": 200, "name": "Enterprise Basic", "plan_id": "enterprise_l1" }, "usage": { "devices": 48, "open_alerts": 3 }, "workspace_id": "9f1c4d6e-2b70-4a55-9a1e-6c3f8b2d5471"}Headers
Section titled “Headers”Requests allowed in the window this response was counted against.
Requests left in that window. A refusal costs no allowance.
The key is missing, unknown, revoked or expired.
Every non-success response the external API produces.
object
What a refusal says. code is drawn from one declared set; per-code
members such as required_scope and max_days are additive.
object
Machine-readable reason, from the published set.
What went wrong, in words.
Example
{ "error": { "code": "insufficient_scope", "message": "This key does not hold devices:read.", "required_scope": "devices:read" }}Headers
Section titled “Headers”Always Bearer.
Requests allowed in the window this response was counted against.
Requests left in that window. A refusal costs no allowance.
The plan grants no external API access, or the key lacks the required scope.
Every non-success response the external API produces.
object
What a refusal says. code is drawn from one declared set; per-code
members such as required_scope and max_days are additive.
object
Machine-readable reason, from the published set.
What went wrong, in words.
Example
{ "error": { "code": "insufficient_scope", "message": "This key does not hold devices:read.", "required_scope": "devices:read" }}Headers
Section titled “Headers”Requests allowed in the window this response was counted against.
Requests left in that window. A refusal costs no allowance.
No such resource in this key’s workspace, or no such endpoint.
Every non-success response the external API produces.
object
What a refusal says. code is drawn from one declared set; per-code
members such as required_scope and max_days are additive.
object
Machine-readable reason, from the published set.
What went wrong, in words.
Example
{ "error": { "code": "insufficient_scope", "message": "This key does not hold devices:read.", "required_scope": "devices:read" }}Headers
Section titled “Headers”Requests allowed in the window this response was counted against.
Requests left in that window. A refusal costs no allowance.
That method is not allowed on this endpoint.
Every non-success response the external API produces.
object
What a refusal says. code is drawn from one declared set; per-code
members such as required_scope and max_days are additive.
object
Machine-readable reason, from the published set.
What went wrong, in words.
Example
{ "error": { "code": "insufficient_scope", "message": "This key does not hold devices:read.", "required_scope": "devices:read" }}Headers
Section titled “Headers”Requests allowed in the window this response was counted against.
Requests left in that window. A refusal costs no allowance.
The request could not be understood, or its time range is too wide.
Every non-success response the external API produces.
object
What a refusal says. code is drawn from one declared set; per-code
members such as required_scope and max_days are additive.
object
Machine-readable reason, from the published set.
What went wrong, in words.
Example
{ "error": { "code": "insufficient_scope", "message": "This key does not hold devices:read.", "required_scope": "devices:read" }}Headers
Section titled “Headers”Requests allowed in the window this response was counted against.
Requests left in that window. A refusal costs no allowance.
The workspace’s external allowance is spent.
Every non-success response the external API produces.
object
What a refusal says. code is drawn from one declared set; per-code
members such as required_scope and max_days are additive.
object
Machine-readable reason, from the published set.
What went wrong, in words.
Example
{ "error": { "code": "insufficient_scope", "message": "This key does not hold devices:read.", "required_scope": "devices:read" }}Headers
Section titled “Headers”Whole seconds to wait before retrying. Never less than one.
Requests allowed in the window this response was counted against.
Requests left in that window. A refusal costs no allowance.
Something went wrong on our side.
Every non-success response the external API produces.
object
What a refusal says. code is drawn from one declared set; per-code
members such as required_scope and max_days are additive.
object
Machine-readable reason, from the published set.
What went wrong, in words.
Example
{ "error": { "code": "insufficient_scope", "message": "This key does not hold devices:read.", "required_scope": "devices:read" }}Headers
Section titled “Headers”Requests allowed in the window this response was counted against.
Requests left in that window. A refusal costs no allowance.

