Skip to content

List pending enrollments

Deprecated
GET
/v1/enrollments
curl --request GET \
--url https://app.caprid.com/v1/enrollments \
--header 'Authorization: Bearer <token>'

GET /v1/organizations/{id}/enrollments for the API key’s Organization.

The pending enrollments.

Media typeapplication/json
Array<object>
object
id
required

Identifies the enrollment for revoking it. Not the token.

string
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
url
required

The URL as you sent it.

string
canonical
required

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

string
region
required
string
gateway
required
boolean
client_url

The Client URL the Node will have. Omitted when it has none.

string
preview
required

The first 6 characters of the token after sbe_.

string
created_at
required
integer
expires_at
required
integer

Example generated

[
{
"id": "example",
"account": "example",
"url": "example",
"canonical": "example",
"region": "example",
"gateway": true,
"client_url": "example",
"preview": "example",
"created_at": 1,
"expires_at": 1
}
]

Sent with a session, which may belong to several Organizations. Use the route the message names instead. This route also returns 400 for anything that route would refuse with 400.

Media typeapplication/json
object
error
required
string

Example

{
"error": "this route is for API keys; use /v1/organizations/{id}/api-keys"
}

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"
}