Manage Actors
List Actor Names
List the distinct actor names that have been created in a namespace.
GET https://api.rivet.dev/actors/names
Examples
curl "https://api.rivet.dev/actors/names?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 response = await fetch(
`${endpoint}/actors/names?namespace=${namespace}`,
{
headers: { Authorization: `Bearer ${token}` },
},
);
const { names } = await response.json();
console.log(Object.keys(names)); // ["counter", ...]
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 | Yes | 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
| Field | Type | Description |
|---|---|---|
names | object | Map of actor name to metadata. |
pagination | object | |
pagination.cursor | string | null | Cursor for the next page, or null when there are no more results. |
{
"names": {},
"pagination": {
"cursor": null
}
}