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 #
| Attribute | Type | Description |
|---|---|---|
id | string | Unique identifier, prefixed with res_. |
object | string | Always resource. |
name | string | Human-readable name. |
status | enum | One of active, paused, or archived. |
metadata | object | Up to 50 key-value pairs you attach to the object. |
created | integer | Creation time as a Unix timestamp. |
List resources #
GET
/v1/resources
Returns a paginated list of resources, most recent first.
Query parameters
| Parameter | Type | Description | |
|---|---|---|---|
limit | integer | optional | Between 1 and 100. Defaults to 20. |
starting_after | string | optional | A resource ID to paginate after. |
status | enum | optional | Filter 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
| Parameter | Type | Description | |
|---|---|---|---|
name | string | required | A name for the resource, up to 200 characters. |
status | enum | optional | Initial status. Defaults to active. |
metadata | object | optional | Arbitrary 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
| Parameter | Type | Description | |
|---|---|---|---|
name | string | optional | Updated name. |
status | enum | optional | active, paused, or archived. |
metadata | object | optional | Merged 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
}