Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions vendor/api/docs/content/actors/create.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: "Create Actor"
description: "Create a new actor. Fails if a live actor with the same name and key already exists."
description: "Create a new actor. Fails if an actor with the same name and key already exists."
---

{/* Generated by scripts/docs/gen-api-reference.mjs from engine/artifacts/openapi.json and docs/api/endpoints.json. Do not edit by hand. */}

Prefer [Get or Create Actor](/docs/api/actors/get-or-create) for idempotent access by key. Use this endpoint when you need a fresh actor every time, for example with a random key. The request returns once the actor's record exists, and fails after 30 seconds. A namespace token needs a grant on `actor` with `create`.
Prefer [Get or Create Actor](/docs/api/actors/get-or-create) for idempotent access by key. Use this endpoint when you need a fresh actor every time, for example with a random key.

```http
POST https://rivet.example.com/actors
Expand All @@ -22,7 +22,8 @@ curl -X POST "https://rivet.example.com/actors?namespace=$RIVET_NAMESPACE" \
-d '{
"name": "counter",
"key": "my-counter",
"runner_name_selector": "default"
"runner_name_selector": "default",
"crash_policy": "sleep"
}'
```

Expand All @@ -32,47 +33,47 @@ curl -X POST "https://rivet.example.com/actors?namespace=$RIVET_NAMESPACE" \

## Authentication

Send the admin token, or a namespace token from [Create Token](/docs/api/tokens/create) 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](/docs/api/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](/docs/api/authentication).

## Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `namespace` | `string` | No | Name of the namespace to operate in. Defaults to `default`. |
| `namespace` | `string` | No | Name of the namespace to operate in. |

## Request Body

Content type: `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | Name of the actor as registered in your RivetKit registry. 1 to 64 bytes. |
| `key` | `string \| null` | No | Key identifying this actor within its name. Multi-part keys are joined with `/`, see [Actor Keys](/docs/api/actor-keys). Omit for an actor without a key. |
| `input` | `string \| null` | No | Input passed to the actor, encoded as standard base64 (not base64url). |
| `runner_name_selector` | `string \| null` | No | Node pool that runs the actor. Defaults to `default`. |
| `name` | `string` | Yes | Name of the actor as registered in your RivetKit registry. |
| `key` | `string \| null` | No | Key identifying this actor within its name. Multi-part keys are joined with `/`, see [Actor Keys](/docs/api/actor-keys). Omit for a keyless actor. |
| `input` | `string \| null` | No | Base64url-encoded CBOR input passed to the actor's `createState` and `onCreate` hooks. |
| `pool` | `string \| null` | No | Name of the node pool to run the actor in. Defaults to `default`. |

## Responses

### 200

The created actor. `created` is always `true`.
The created actor.

| Field | Type | Description |
| --- | --- | --- |
| `actor` | `object` | |
| `actor.actor_id` | `string` | Unique ID of the actor. |
| `actor.name` | `string` | Actor name as registered in your RivetKit registry. |
| `actor.key` | `string` | Actor key. Multi-part keys are joined with `/`, see [Actor Keys](/docs/api/actor-keys). An empty string for an actor without a key. |
| `actor.key` | `string` | Actor key. Multi-part keys are joined with `/`, see [Actor Keys](/docs/api/actor-keys). |
| `actor.namespace` | `string` | Name of the namespace the actor belongs to. |
| `actor.runner_name_selector` | `string` | Node pool the actor runs in. |
| `actor.pool` | `string` | Name of the node pool the actor runs in. |
| `actor.create_ts` | `integer` | When the actor was created, in Unix milliseconds. |
| `actor.start_ts` | `integer \| null` | When the actor first started. Not recorded by this version, so always `null`. |
| `actor.pending_allocation_ts` | `integer \| null` | When the actor started waiting for a node. Not recorded by this version, so always `null`. |
| `actor.connectable_ts` | `integer \| null` | When the actor last became connectable. Not recorded by this version, so always `null`. |
| `actor.sleep_ts` | `integer \| null` | When the actor went to sleep. Not recorded by this version, so always `null`. |
| `actor.reschedule_ts` | `integer \| null` | When the actor will next try to allocate. Not recorded by this version, so always `null`. |
| `actor.destroy_ts` | `integer \| null` | When the actor was destroyed, in Unix milliseconds. Only set in listings that include destroyed actors; otherwise `null`. |
| `created` | `boolean` | Always `true`. |
| `created` | `boolean` | `true` if this request created the actor, `false` if it already existed. |

```json
{
Expand All @@ -81,7 +82,7 @@ The created actor. `created` is always `true`.
"name": "my-actor",
"key": "my-key",
"namespace": "my-namespace",
"runner_name_selector": "default",
"pool": "default",
"create_ts": 1700000000000,
"start_ts": null,
"pending_allocation_ts": null,
Expand All @@ -96,7 +97,7 @@ The created actor. `created` is always `true`.

### 400

`actor.invalid_name`: `name` is empty or longer than 64 bytes. `actor.invalid_key`: `key` is longer than 1024 bytes. `actor.invalid_key_encoding`: `key` is not in canonical slash-separated form. `actor.key_owned_elsewhere`: another datacenter owns the key. `envoy.invalid_pool_name`: `runner_name_selector` 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.
`actor.invalid_name`: `name` is empty or longer than 64 bytes. `actor.invalid_key`: `key` is longer than 1024 bytes. `actor.invalid_key_encoding`: `key` is not in canonical slash-separated form. `actor.key_owned_elsewhere`: another datacenter owns the key. `envoy.invalid_pool_name`: `pool` 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 |
| --- | --- | --- |
Expand Down
8 changes: 3 additions & 5 deletions vendor/api/docs/content/actors/destroy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ description: "Destroy an actor. The actor's onDestroy hook runs, then its state

{/* Generated by scripts/docs/gen-api-reference.mjs from engine/artifacts/openapi.json and docs/api/endpoints.json. Do not edit by hand. */}

A namespace token needs a grant on `actor` with `delete`.

```http
DELETE https://rivet.example.com/actors/{actor_id}
```
Expand All @@ -26,7 +24,7 @@ curl -X DELETE "https://rivet.example.com/actors/$ACTOR_ID?namespace=$RIVET_NAME

## Authentication

Send the admin token, or a namespace token from [Create Token](/docs/api/tokens/create) 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](/docs/api/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](/docs/api/authentication).

## Path Parameters

Expand All @@ -38,13 +36,13 @@ Send the admin token, or a namespace token from [Create Token](/docs/api/tokens/

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `namespace` | `string` | No | Name of the namespace to operate in. Defaults to `default`. |
| `namespace` | `string` | No | Name of the namespace to operate in. |

## Responses

### 200

The destroy was accepted. The response body is an empty object.
The destroy was accepted.

```json
{}
Expand Down
23 changes: 12 additions & 11 deletions vendor/api/docs/content/actors/get-or-create.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "Return the actor with the given name and key, creating it if it do

{/* Generated by scripts/docs/gen-api-reference.mjs from engine/artifacts/openapi.json and docs/api/endpoints.json. Do not edit by hand. */}

The response includes `created`, which is `true` when this call created the actor. A sleeping actor is woken. Without `key`, a new actor is created every time. Gateway endpoints can perform the same lookup inline with the `rvt-*` selector parameters, so you only need this endpoint when you want the `actor_id` up front. A namespace token needs a grant on `actor` with `create`.
The response includes `created`, which is `true` when this call created the actor. Gateway endpoints can perform the same lookup inline with the `rvt-*` selector parameters, so you only need this endpoint when you want the `actor_id` up front.

```http
PUT https://rivet.example.com/actors
Expand All @@ -22,7 +22,8 @@ curl -X PUT "https://rivet.example.com/actors?namespace=$RIVET_NAMESPACE" \
-d '{
"name": "counter",
"key": "my-counter",
"runner_name_selector": "default"
"runner_name_selector": "default",
"crash_policy": "sleep"
}'
```

Expand All @@ -32,24 +33,24 @@ curl -X PUT "https://rivet.example.com/actors?namespace=$RIVET_NAMESPACE" \

## Authentication

Send the admin token, or a namespace token from [Create Token](/docs/api/tokens/create) 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](/docs/api/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](/docs/api/authentication).

## Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `namespace` | `string` | No | Name of the namespace to operate in. Defaults to `default`. |
| `namespace` | `string` | No | Name of the namespace to operate in. |

## Request Body

Content type: `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | Name of the actor as registered in your RivetKit registry. 1 to 64 bytes. |
| `name` | `string` | Yes | Name of the actor as registered in your RivetKit registry. |
| `key` | `string \| null` | No | Key identifying this actor within its name. Multi-part keys are joined with `/`, see [Actor Keys](/docs/api/actor-keys). |
| `input` | `string \| null` | No | Input passed to the actor if this request creates it, encoded as standard base64 (not base64url). |
| `runner_name_selector` | `string \| null` | No | Node pool that runs the actor. Defaults to `default`. |
| `input` | `string \| null` | No | Base64url-encoded CBOR input passed to the actor's `createState` and `onCreate` hooks when the actor is created. |
| `pool` | `string \| null` | No | Name of the node pool to run the actor in. Defaults to `default`. |

## Responses

Expand All @@ -62,9 +63,9 @@ The existing or created actor.
| `actor` | `object` | |
| `actor.actor_id` | `string` | Unique ID of the actor. |
| `actor.name` | `string` | Actor name as registered in your RivetKit registry. |
| `actor.key` | `string` | Actor key. Multi-part keys are joined with `/`, see [Actor Keys](/docs/api/actor-keys). An empty string for an actor without a key. |
| `actor.key` | `string` | Actor key. Multi-part keys are joined with `/`, see [Actor Keys](/docs/api/actor-keys). |
| `actor.namespace` | `string` | Name of the namespace the actor belongs to. |
| `actor.runner_name_selector` | `string` | Node pool the actor runs in. |
| `actor.pool` | `string` | Name of the node pool the actor runs in. |
| `actor.create_ts` | `integer` | When the actor was created, in Unix milliseconds. |
| `actor.start_ts` | `integer \| null` | When the actor first started. Not recorded by this version, so always `null`. |
| `actor.pending_allocation_ts` | `integer \| null` | When the actor started waiting for a node. Not recorded by this version, so always `null`. |
Expand All @@ -81,7 +82,7 @@ The existing or created actor.
"name": "my-actor",
"key": "my-key",
"namespace": "my-namespace",
"runner_name_selector": "default",
"pool": "default",
"create_ts": 1700000000000,
"start_ts": null,
"pending_allocation_ts": null,
Expand All @@ -96,7 +97,7 @@ The existing or created actor.

### 400

`actor.invalid_name`: `name` is empty or longer than 64 bytes. `actor.invalid_key`: `key` is longer than 1024 bytes. `actor.invalid_key_encoding`: `key` is not in canonical slash-separated form. `actor.key_owned_elsewhere`: another datacenter owns the key. `envoy.invalid_pool_name`: `runner_name_selector` 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.
`actor.invalid_name`: `name` is empty or longer than 64 bytes. `actor.invalid_key`: `key` is longer than 1024 bytes. `actor.invalid_key_encoding`: `key` is not in canonical slash-separated form. `actor.key_owned_elsewhere`: another datacenter owns the key. `envoy.invalid_pool_name`: `pool` 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 |
| --- | --- | --- |
Expand Down
Loading
Loading