List Pools
List the node pools configured in a namespace, ordered by name. Results are paginated.
GET https://rivet.example.com/pools
Examples
curl "https://rivet.example.com/pools?namespace=$RIVET_NAMESPACE" \
-H "Authorization: Bearer $RIVET_TOKEN"
const endpoint = "https://api.rivet.dev";
const namespace = process.env.RIVET_NAMESPACE ?? "default";
const token = process.env.RIVET_TOKEN ?? "";
const params = new URLSearchParams({ namespace });
const response = await fetch(`${endpoint}/pools?${params}`, {
headers: { Authorization: `Bearer ${token}` },
});
const { pools, pagination } = await response.json();
console.log(pools, 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 |
|---|---|---|---|
namespace | string | No | Name of the namespace to operate in. |
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. |
Responses
200
A page of node pools.
| Field | Type | Description |
|---|---|---|
pagination | object | |
pagination.cursor | string | null | Cursor for the next page, or null when there are no more results. |
pools | object[] | |
pools[].name | string | Name of the node pool. |
pools[].drain_on_version_upgrade | boolean | Drain nodes running an older version when a newer version connects. |
pools[].actor_eviction_delay | integer | Seconds to wait before evicting actors from a draining node. |
pools[].actor_eviction_period | integer | Seconds over which actors are evicted from a draining node. |
pools[].actor_eviction_rate | number | Rate at which actors are evicted from a draining node. Must be finite and greater than 0. |
pools[].metadata | any | Opaque JSON stored with the pool, or null when unset. |
{
"pagination": {
"cursor": null
},
"pools": [
{
"name": "default",
"drain_on_version_upgrade": false,
"actor_eviction_delay": 0,
"actor_eviction_period": 0,
"actor_eviction_rate": 0,
"metadata": null
}
]
}
400
actor.invalid_limit: limit is not an integer from 1 to 100. envoy.invalid_pool_name: cursor is not a valid pool name. envoy.invalid_namespace_name: the namespace value is not a DNS label of 1 to 63 lowercase letters, digits and hyphens.
| 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. Only present on some errors raised while authenticating or authorizing the request. |
{
"group": "actor",
"code": "invalid_limit",
"message": "The actor listing limit must be an integer from 1 to 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. 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.
| 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. Only present on some errors raised while authenticating or authorizing the request. |
{
"group": "auth",
"code": "insufficient_permissions",
"message": "Insufficient permissions to access this resource."
}
404
namespace.not_found: the namespace does not exist.
| 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. Only present on some errors raised while authenticating or authorizing the request. |
{
"group": "namespace",
"code": "not_found",
"message": "The namespace does not exist."
}
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. 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.
| 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. 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."
}