Skip to content
Merged
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
9 changes: 4 additions & 5 deletions website/src/content/docs/actors/debugging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,15 @@ Use your local manager URL in development (`http://localhost:6420`) or `https://

If auth is enabled, pass a bearer token:

- **Rivet Cloud**: Use the service key (`sk_*`) from your `RIVET_ENDPOINT` URL. Find this in the dashboard under **Settings > Advanced > Backend Configuration** (e.g. the `sk_...` portion of `https://default:sk_abc123@api.rivet.dev`).
- **Self-hosted**: Use an admin token.

```bash
export RIVET_API="https://api.rivet.dev"
export RIVET_NAMESPACE="default"
export RIVET_TOKEN="YOUR_API_TOKEN"
export RIVET_TOKEN="your-token"
```

<Note>
On Rivet Cloud, create a Cloud API token in the dashboard and use it as `RIVET_TOKEN` here.
</Note>

### List Runner Names

```bash
Expand Down
16 changes: 11 additions & 5 deletions website/src/content/docs/actors/destroy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ const userActor = actor({

### Destroy via HTTP

Send a DELETE request to destroy an actor. This requires an admin token for authentication.
Send a DELETE request to destroy an actor. This requires a token for authentication:

- **Rivet Cloud**: Use the service key (`sk_*`) from your `RIVET_ENDPOINT` URL. Find this in the dashboard under **Settings > Advanced > Backend Configuration** (e.g. the `sk_...` portion of `https://default:sk_abc123@api.rivet.dev`).
- **Self-hosted**: Use an admin token.

<CodeGroup>

```typescript
const actorId = "your-actor-id";
const namespace = "default";
const token = "your-admin-token";
const token = "your-token";

await fetch(`https://api.rivet.dev/actors/${actorId}?namespace=${namespace}`, {
method: "DELETE",
Expand All @@ -64,9 +67,12 @@ curl -X DELETE "https://api.rivet.dev/actors/{actorId}?namespace={namespace}" \
```
</CodeGroup>

<Note>
On Rivet Cloud, create an API token from Settings > Advanced > Cloud API Tokens > Create API Token, then use it as the bearer token above.
</Note>
To find the actor ID, you can list actors first:

```bash
curl "https://api.rivet.dev/actors?namespace={namespace}" \
-H "Authorization: Bearer {token}"
```

### Destroy via Dashboard

Expand Down
Loading