Skip to content

List your Nodes

GET
/v1/organizations/{id}/nodes
curl --request GET \
--url https://app.caprid.com/v1/organizations/4/nodes \
--header 'Authorization: Bearer <token>'

Every Node the Organization has enrolled, running or not.

id
required
integer

The Organization’s id, from GET /v1/organizations.

Example

4

The Nodes.

Media typeapplication/json
Array<object>
object
url
required

The URL the Node’s peers dial, as it was enrolled.

string
canonical
required

The URL in the normalized form Switchboard uses to tell Nodes apart.

string
source
required
string
Allowed values: poll static
account
required

The Organization’s oldest Namespace, kept from before Organizations. The Node belongs to the whole Organization and carries all of its Namespaces. null when the Organization has no Namespaces.

string | null
region
required
string
gateway
required
boolean
client_url

The Client URL, which is where Clients, such as a player page, reach this relay when that isn’t url. On a private network, url is often a name no Client can resolve, so whatever hands relay addresses to Clients reads this instead. It is fixed when the Node is enrolled, and omitted when the Node has none. Relays never see it, because peer discovery hands out only url.

string
enrolled
required

Whether the Node came from a Relay enrollment token, so its relay has a Node key.

boolean
first_seen_at
required
integer
last_seen_at
required

When its relay last polled, or when it enrolled if it hasn’t polled since.

integer
live
required

Whether its relay has polled in the last 90 seconds.

boolean

Example

[
{
"source": "poll"
}
]

No valid credential. Missing, expired and revoked credentials all get the same response, and so does an API key whose trial has lapsed. An Agent token from before a claim gets a 401 too, once the claim has made the trial a person’s, with a message saying to get a new token.

Media typeapplication/json
object
error
required
string

Example

{
"error": "the requested grants exceed the key's scope"
}
WWW-Authenticate
string
Example
Bearer realm="switchboard"

Sent with an API key limited to some Namespaces, to a Namespace outside its limit, or to a route that acts on the Organization as a whole. A limited key can never create API keys.

Media typeapplication/json
object
error
required
string

Example

{
"error": "this API key is limited to the Namespaces acme-staging, and acme isn't one of them"
}

No such thing, or not yours. Another customer’s Organization or Namespace is a 404 too, so nobody can tell which ones exist.

Media typeapplication/json
object
error
required
string

Example

{
"error": "the requested grants exceed the key's scope"
}