Docs API v1.4
Dashboard

API reference

The Resources API lets you manage the core objects in your account. All endpoints are relative to https://api.docs.vexart.net/v1 and return JSON. Every list endpoint supports cursor-based pagination via limit and starting_after.

The resource object #

AttributeTypeDescription
idstringUnique identifier, prefixed with res_.
objectstringAlways resource.
namestringHuman-readable name.
statusenumOne of active, paused, or archived.
metadataobjectUp to 50 key-value pairs you attach to the object.
createdintegerCreation time as a Unix timestamp.

List resources #

GET /v1/resources

Returns a paginated list of resources, most recent first.

Query parameters

ParameterTypeDescription
limitintegeroptionalBetween 1 and 100. Defaults to 20.
starting_afterstringoptionalA resource ID to paginate after.
statusenumoptionalFilter by active, paused, or archived.
curl https://api.docs.vexart.net/v1/resources?limit=10 \
  -H "Authorization: Bearer sk_live_4eC39Hq..."
const page = await client.resources.list({ limit: 10 });
page = client.resources.list(limit=10)

Create a resource #

POST /v1/resources

Creates a new resource. Supply an idempotency key to make retries safe.

Body parameters

ParameterTypeDescription
namestringrequiredA name for the resource, up to 200 characters.
statusenumoptionalInitial status. Defaults to active.
metadataobjectoptionalArbitrary key-value pairs.
curl https://api.docs.vexart.net/v1/resources \
  -H "Authorization: Bearer sk_live_4eC39Hq..." \
  -H "Idempotency-Key: a1b2c3d4" \
  -d name="Production cluster" \
  -d status="active"
const resource = await client.resources.create({
  name: "Production cluster",
  status: "active",
});
resource = client.resources.create(
    name="Production cluster",
    status="active",
)
201 · JSON
{
  "id": "res_8Xk2mPq19Z",
  "object": "resource",
  "name": "Production cluster",
  "status": "active",
  "metadata": {},
  "created": 1718668800
}

Retrieve a resource #

GET /v1/resources/{id}

Retrieves a single resource by its ID.

curl https://api.docs.vexart.net/v1/resources/res_8Xk2mPq19Z \
  -H "Authorization: Bearer sk_live_4eC39Hq..."
const resource = await client.resources.retrieve("res_8Xk2mPq19Z");
resource = client.resources.retrieve("res_8Xk2mPq19Z")

Update a resource #

POST /v1/resources/{id}

Updates the supplied attributes. Any parameters you omit are left unchanged.

Body parameters

ParameterTypeDescription
namestringoptionalUpdated name.
statusenumoptionalactive, paused, or archived.
metadataobjectoptionalMerged with existing metadata.
curl https://api.docs.vexart.net/v1/resources/res_8Xk2mPq19Z \
  -H "Authorization: Bearer sk_live_4eC39Hq..." \
  -d status="paused"
const updated = await client.resources.update("res_8Xk2mPq19Z", {
  status: "paused",
});
updated = client.resources.update("res_8Xk2mPq19Z", status="paused")

Delete a resource #

DELETE /v1/resources/{id}

Permanently deletes a resource. This action cannot be undone.

curl -X DELETE https://api.docs.vexart.net/v1/resources/res_8Xk2mPq19Z \
  -H "Authorization: Bearer sk_live_4eC39Hq..."
await client.resources.del("res_8Xk2mPq19Z");
client.resources.delete("res_8Xk2mPq19Z")
200 · JSON
{
  "id": "res_8Xk2mPq19Z",
  "object": "resource",
  "deleted": true
}