Skip to main content
Manage Actors

List Actors

List actors in a namespace by ID, by name and key, or by name. Listings by name are paginated.

Pass actor_ids (comma-separated) to look up actors by ID, or name with an optional key. actor_ids takes precedence over name and key. Only a listing by name without key is paginated; a page can hold fewer than limit actors while pagination.cursor is still set. Destroyed actors are excluded unless include_destroyed is true. A namespace token needs a grant on actor with list.

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

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.

Query Parameters

NameTypeRequiredDescription
namespacestringNoName of the namespace to operate in. Defaults to default.
namestringNoOnly return actors with this name. Required unless actor_ids or actor_id is set.
keystringNoOnly return the actor with this key. Requires name. Multi-part keys are joined with /, see Actor Keys.
actor_idsstringNoComma-separated IDs of the actors to return.
actor_idstringNoSame as actor_ids. Used only when actor_ids is absent.
include_destroyedbooleanNoInclude destroyed actors. Must be true or false.
limitintegerNoMaximum number of results to return, from 1 to 100. Defaults to 100.
cursorstringNoPagination cursor. Pass the pagination.cursor value from the previous response to fetch the next page.

Responses

200

Matching actors and a cursor for the next page. pagination.cursor is null on the last page.

FieldTypeDescription
actorsobject[]
actors[].actor_idstringUnique ID of the actor.
actors[].namestringActor name as registered in your RivetKit registry.
actors[].keystringActor key. Multi-part keys are joined with /, see Actor Keys. An empty string for an actor without a key.
actors[].namespacestringName of the namespace the actor belongs to.
actors[].runner_name_selectorstringNode pool the actor runs in.
actors[].create_tsintegerWhen the actor was created, in Unix milliseconds.
actors[].start_tsinteger | nullWhen the actor first started. Not recorded by this version, so always null.
actors[].pending_allocation_tsinteger | nullWhen the actor started waiting for a node. Not recorded by this version, so always null.
actors[].connectable_tsinteger | nullWhen the actor last became connectable. Not recorded by this version, so always null.
actors[].sleep_tsinteger | nullWhen the actor went to sleep. Not recorded by this version, so always null.
actors[].reschedule_tsinteger | nullWhen the actor will next try to allocate. Not recorded by this version, so always null.
actors[].destroy_tsinteger | nullWhen the actor was destroyed, in Unix milliseconds. Only set in listings that include destroyed actors; otherwise null.
paginationobject
pagination.cursorstring | nullCursor for the next page, or null when there are no more results.
{
  "actors": [
    {
      "actor_id": "d97pbq1nyqxw1w5qdwz0iirbqiblh2",
      "name": "my-actor",
      "key": "my-key",
      "namespace": "my-namespace",
      "runner_name_selector": "default",
      "create_ts": 1700000000000,
      "start_ts": null,
      "pending_allocation_ts": null,
      "connectable_ts": null,
      "sleep_ts": null,
      "reschedule_ts": null,
      "destroy_ts": null
    }
  ],
  "pagination": {
    "cursor": null
  }
}

400

actor.invalid_listing: neither name nor actor IDs were given. actor.invalid_include_destroyed, actor.invalid_limit, actor.invalid_cursor: the parameter is malformed. actor.invalid_key_encoding: key is not in canonical slash-separated form. envoy.invalid_namespace_name: the namespace value is not a DNS label of 1 to 63 lowercase letters, digits and hyphens.

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": "actor",
  "code": "invalid_listing",
  "message": "Listing actors requires a name or actor IDs."
}

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."
}

404

namespace.not_found: the namespace does not exist.

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": "namespace",
  "code": "not_found",
  "message": "The namespace does not exist."
}

500

core.internal_error: an unexpected failure, including an actor ID that is not a valid Rivet ID.

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."
}