Namespaces
List Namespaces
List namespaces, optionally filtered by name or ID. Results are paginated.
Use namespace_id for multiple IDs. namespace_ids is deprecated.
GET https://api.rivet.dev/namespaces
Examples
curl "https://api.rivet.dev/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 |
|---|---|---|---|
limit | integer | No | Maximum number of results to return. |
cursor | string | No | Pagination cursor. Pass the pagination.cursor value from the previous response to fetch the next page. |
name | string | No | Only return namespaces with this name. |
namespace_ids | string | No | Deprecated. Use namespace_id instead. |
namespace_id | string[] | No | Only return namespaces with these IDs. Repeat the parameter for multiple IDs. |
Responses
200
Matching namespaces and a cursor for the next page.
| Field | Type | Description |
|---|---|---|
namespaces | object[] | |
namespaces[].create_ts | integer | |
namespaces[].display_name | string | |
namespaces[].name | string | |
namespaces[].namespace_id | string | |
pagination | object | |
pagination.cursor | string | null | Cursor for the next page, or null when there are no more results. |
{
"namespaces": [
{
"create_ts": 1700000000000,
"display_name": "<display_name>",
"name": "my-actor",
"namespace_id": "00000000-0000-0000-0000-000000000000"
}
],
"pagination": {
"cursor": null
}
}