Workers
Refresh Config Metadata
Fetch and store fresh metadata for a serverless worker configuration.
The endpoint refreshes the first serverless configuration it finds across datacenters. It fails when the worker name has no serverless configuration.
POST https://api.rivet.dev/runner-configs/{runner_name}/refresh-metadata
Examples
curl -X POST "https://api.rivet.dev/runner-configs/$RUNNER_NAME/refresh-metadata?namespace=$RIVET_NAMESPACE" \
-H "Authorization: Bearer $RIVET_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
const endpoint = "https://api.rivet.dev";
const namespace = process.env.RIVET_NAMESPACE ?? "default";
const token = process.env.RIVET_TOKEN ?? "";
const workerName = process.env.RUNNER_NAME ?? "default";
const params = new URLSearchParams({ namespace });
const response = await fetch(
`${endpoint}/runner-configs/${encodeURIComponent(workerName)}/refresh-metadata?${params}`,
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
},
);
console.log(response.ok);
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.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
runner_name | string | Yes | Name of the worker pool whose metadata will be refreshed. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespace | string | Yes | Name of the namespace to operate in. |
Request Body
Content type: application/json.
Send an empty JSON object: {}.
Responses
200
The metadata was refreshed.
{}