List Namespaces
List namespaces, optionally filtered by name or ID. Results are paginated.
Use namespace_id for multiple IDs. namespace_ids is deprecated. For a namespace upgraded from an earlier release, skipped lists the actors the move into its volume group could not move, by ID, name and key, and skipped_count counts them; both are empty for every other namespace and are removed with the backfill in 3.1. skipped lists at most 1,000 actors, so skipped_count can be higher.
GET https://rivet.example.com/namespaces
Examples
curl "https://rivet.example.com/namespaces" \
-H "Authorization: Bearer $RIVET_TOKEN"
const endpoint = "https://api.rivet.dev";
const token = process.env.RIVET_TOKEN ?? "";
const response = await fetch(`${endpoint}/namespaces`, {
headers: { Authorization: `Bearer ${token}` },
});
const { namespaces, pagination } = await response.json();
console.log(namespaces, pagination.cursor);
export {};
Authentication
Send your namespace token as a bearer token in the Authorization header. Every control plane request also requires the namespace query parameter. See Authentication.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | Only return namespaces with this name. |
cursor | string | No | Pagination cursor. Pass the pagination.cursor value from the previous response to fetch the next page. |
limit | integer | No | Maximum number of results to return. |
Responses
200
Matching namespaces and a cursor for the next page.
| Field | Type | Description |
|---|---|---|
namespaces | object[] | |
namespaces[].name | string | Namespace name. |
namespaces[].create_ts | integer | When the namespace was created, in Unix milliseconds. |
namespaces[].status | "creating" | "forking" | "live" | "archiving" | "archived" | "failed" | creating while a new namespace’s volume group is created, forking while a fork’s group writes run, live once the namespace serves, archiving while its nodes stop what they host, archived once its storage is closed, for good, and failed when a fork was refused after its record was written; the name is then retired. |
namespaces[].forked_from | object | What the namespace was forked from; null for a namespace that is not a fork, and while a fork’s number is not yet known. |
namespaces[].archived_ts | integer | null | When the namespace was archived, in Unix milliseconds; null unless archived. |
namespaces[].skipped | object[] | Legacy: for a namespace upgraded from an earlier release, the actors the move into its volume group could not move, at most 1,000. Each stays reachable by its ID and key until destroyed; destroying it removes it from this list. Empty for every other namespace. Removed with the backfill in 3.1. |
namespaces[].skipped[].actor_id | string | ID of the actor. |
namespaces[].skipped[].name | string | Actor name. |
namespaces[].skipped[].key | string | null | Actor key in the slash form, or null for an actor without one. |
namespaces[].skipped_count | integer | Legacy: how many actors the move could not move and are not destroyed yet, which can exceed the length of skipped. Forks and archives of the namespace are refused while it is above zero. Removed with the backfill in 3.1. |
pagination | object | |
pagination.cursor | string | null | Cursor for the next page, or null when there are no more results. |
{
"namespaces": [
{
"name": "my-namespace",
"create_ts": 1700000000000,
"status": "creating",
"forked_from": null,
"archived_ts": null,
"skipped": [],
"skipped_count": 0
}
],
"pagination": {
"cursor": null
}
}
400
namespace.invalid: limit is outside 1 to 100. envoy.invalid_namespace_name: name or cursor is not a valid namespace name. A query string with any other parameter, or a limit that is not a non-negative integer, is rejected with a plain-text 400.
| Field | Type | Description |
|---|---|---|
group | string | Error group, for example actor. |
code | string | Error code within the group, for example not_found. |
message | string | Human-readable error message. |
metadata | any | Extra details on some errors, for example the retry hint of a refusal or the new actor of a pending fork. |
{
"group": "namespace",
"code": "invalid",
"message": "Namespace list limit must be between 1 and 100."
}
401
auth.invalid_token: the request carries no token, or the token is not valid. auth.token_expired: the token has expired.
| Field | Type | Description |
|---|---|---|
group | string | Error group, for example actor. |
code | string | Error code within the group, for example not_found. |
message | string | Human-readable error message. |
metadata | any | Extra details on some errors, for example the retry hint of a refusal or the new actor of a pending fork. |
{
"group": "auth",
"code": "invalid_token",
"message": "Authentication token is invalid."
}
403
auth.insufficient_permissions: the token’s grants do not cover this request. Namespace management is only available to the admin token.
| Field | Type | Description |
|---|---|---|
group | string | Error group, for example actor. |
code | string | Error code within the group, for example not_found. |
message | string | Human-readable error message. |
metadata | any | Extra details on some errors, for example the retry hint of a refusal or the new actor of a pending fork. |
{
"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.
| Field | Type | Description |
|---|---|---|
group | string | Error group, for example actor. |
code | string | Error code within the group, for example not_found. |
message | string | Human-readable error message. |
metadata | any | Extra details on some errors, for example the retry hint of a refusal or the new actor of a pending fork. |
{
"group": "core",
"code": "internal_error",
"message": "An internal error occurred"
}
503
auth.verification_unavailable: token verification keys are temporarily unavailable. Retry the request.
| Field | Type | Description |
|---|---|---|
group | string | Error group, for example actor. |
code | string | Error code within the group, for example not_found. |
message | string | Human-readable error message. |
metadata | any | Extra details on some errors, for example the retry hint of a refusal or the new actor of a pending fork. |
{
"group": "auth",
"code": "verification_unavailable",
"message": "The server could not verify the authentication token because verification keys are temporarily unavailable. Retry the request."
}