Skip to content

Fetch the workspace account

GET
/account
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.

Successful Response

Media typeapplication/json
Account

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
name
required
Name
string
plan
required
Plan

The workspace’s plan, as far as it shapes a caller’s own behaviour.

object
external_requests_per_day
required
External Requests Per Day

This API’s daily allowance.

integer
external_requests_per_minute
required
External Requests Per Minute

This API’s burst allowance.

integer
history_max_days
required
Any of:
integer
max_api_keys
required
Max Api Keys

How many live keys this workspace may hold.

integer
max_devices_per_page
required
Max Devices Per Page

The largest page size this API accepts.

integer
name
required
Name
string
plan_id
required
Plan Id

The tier identifier.

string
usage
required
Usage

What the workspace currently holds.

object
devices
required
Devices

Devices in the workspace.

integer
open_alerts
required
Open Alerts

Alerts not yet resolved.

integer
workspace_id
required
Workspace Id
string format: uuid
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"
}
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.