Skip to main content
Control Plane

List Datacenters

List the datacenters configured for the control plane.

A namespace token needs a grant on datacenter with list.

GET https://rivet.example.com/datacenters

Examples

Authentication

Send the admin token, or a namespace token from Create Token whose grants cover the request, as a bearer token in the Authorization header. The x-rivet-token header is also accepted. Routes with a namespace query parameter use the default namespace when it is omitted. See Authentication.

Responses

200

Configured datacenters.

FieldTypeDescription
datacentersobject[]
datacenters[].namestringDatacenter name.
{
  "datacenters": [
    {
      "name": "default"
    }
  ]
}

401

auth.invalid_token: the request carries no token, or the token is not valid. auth.token_expired: the token has expired.

FieldTypeDescription
groupstringError group, for example actor.
codestringError code within the group, for example not_found.
messagestringHuman-readable error message.
metadataanyExtra details. Only present on some errors raised while authenticating or authorizing the request.
{
  "group": "auth",
  "code": "invalid_token",
  "message": "Authentication token is invalid."
}

403

auth.insufficient_permissions: the token’s grants do not cover this request.

FieldTypeDescription
groupstringError group, for example actor.
codestringError code within the group, for example not_found.
messagestringHuman-readable error message.
metadataanyExtra details. Only present on some errors raised while authenticating or authorizing the request.
{
  "group": "auth",
  "code": "insufficient_permissions",
  "message": "Insufficient permissions to access this resource."
}

500

core.internal_error: an unexpected failure. Details are only logged on the server.

FieldTypeDescription
groupstringError group, for example actor.
codestringError code within the group, for example not_found.
messagestringHuman-readable error message.
metadataanyExtra details. Only present on some errors raised while authenticating or authorizing the request.
{
  "group": "core",
  "code": "internal_error",
  "message": "An internal error occurred"
}

503

auth.verification_unavailable: token verification keys are temporarily unavailable. Retry the request.

FieldTypeDescription
groupstringError group, for example actor.
codestringError code within the group, for example not_found.
messagestringHuman-readable error message.
metadataanyExtra details. Only present on some errors raised while authenticating or authorizing the request.
{
  "group": "auth",
  "code": "verification_unavailable",
  "message": "The server could not verify the authentication token because verification keys are temporarily unavailable. Retry the request."
}