Servers
Server Model
Fields
Field | Type | Description |
|---|---|---|
object | "server" | |
id | string | |
project_id | string | |
project_name | string | Display name of that project. |
team_id | string | |
name | string | null | Generated friendly name, for example swift-hawk. |
sku | string | The server's size, as a named bundle of CPU and memory, for example v1-1cpu-2gb. |
status | | Lifecycle state: provisioning until the server first comes up, then active. A server is
upgrading while a platform update replaces it. A paused free-trial server is draining while
it finishes the data it accepted, then idle. A server removed by scaling down is
terminating until it has finished that data and been deleted. |
provisioning_phase | | null | Why provisioning is still in flight (e.g. "awaiting_capacity"); null once active. |
ordinal | number | The server's stable position in the project's fleet, starting at 0. |
is_deploy_surge | boolean | True for the temporary server a platform update adds. It takes each server's records while that server is replaced, is not billed, and is removed when the update finishes. |
created_at | | |
updated_at | | |
heartbeat_at | | null | When the server last reported its vitals. Servers report every 30 seconds; null means it has never reported. |
cpu_percent | number | CPU usage the server last reported, from 0 to 100. Zero until the first report. |
memory_percent | number | Memory usage the server last reported, from 0 to 100. Zero until the first report. |
spool_percent | number | null | Actual PVC fullness 0-100, derived as max(bytes, inodes), or null before the first heartbeat. |
spool_bytes_percent | number | null | Actual PVC byte fullness 0-100, or null before the first heartbeat. |
spool_inodes_percent | number | null | Actual PVC inode (file-count) fullness 0-100, or null before the first heartbeat. |
Server Event Model
Fields
Field | Type | Description |
|---|---|---|
object | "server_rollout_event" | |
id | string | |
project_id | string | |
started_at | | When the deploy of the project's servers began. |
completed_at | | null | When the deploy finished; null while it is still in progress. |
image_tag | string | null | Version tag the deploy moves the project's servers to. |
phase | string | null | The most recent step the deploy reached; null before the first step is recorded. |
List Servers
Endpoint
Retrieve a list of servers in a project.
/v1/projects/:project_id/servers Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
Query Parameters
Field | Type | Description |
|---|---|---|
order_by | string | Field used to order the servers. Defaults to "created_at". Accepted values: "created_at","status". |
status | | Filter by server status. |
is_deploy_surge | string | Set true to list the temporary server a platform update adds instead of the project's own servers. Accepted values: "true","false","1","0". |
limit | number | Maximum number of items to return. Defaults to 25. Minimum: 1. Maximum: 200. |
after | string | Cursor from pagination.next_cursor of a previous response. Returns the resources after that page. |
before | string | Cursor from pagination.prev_cursor of a previous response. Returns the resources before that page. |
sort | string | Sort direction for the result set. Defaults to "desc". Accepted values: "asc","desc". |
Response
{
message: string;
data: Server[];
status: 200;
error: null;
pagination: Pagination;
endpoint: string;
} Retrieve Server
Endpoint
Retrieve a single server.
/v1/projects/:project_id/servers/:server_id Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
server_id | string | Unique identifier of the server. |
Response
{
message: string;
data: Server;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Scale Servers
Endpoint
Scale a project's fleet to a desired total number of servers.
/v1/projects/:project_id/servers Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
Request Body
Field | Type | Requirement | Description |
|---|---|---|---|
count | integer | Required | Total number of servers the project should run after this request. This is the desired total, not the number of servers to add or remove. The maximum is the team's per-project server limit, which is set by its plan. Minimum: 0. |
Response 200
{
message: string;
data: Server[];
status: 200;
error: null;
pagination: Pagination;
endpoint: string;
} Response 202
{
message: string;
data: Server[];
status: 202;
error: null;
pagination: Pagination;
endpoint: string;
} Update Server
Endpoint
Rename a server.
/v1/projects/:project_id/servers/:server_id Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
server_id | string | Unique identifier of the server. |
Request Body
Field | Type | Requirement | Description |
|---|---|---|---|
name | string | Required | Display name for the server. Minimum length: 1. Maximum length: 64. |
Response
{
message: string;
data: Server;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Retrieve Server Vitals
Endpoint
Retrieve CPU, memory, and buffer usage for a server over a time range.
/v1/projects/:project_id/servers/:server_id/vitals Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
server_id | string | Unique identifier of the server. |
Query Parameters
Field | Type | Description |
|---|---|---|
start_at | | Start time (ISO format, default: 12 hours ago). |
end_at | | End time (ISO format, default: now). |
interval | string | Aggregation interval. Defaults to "minute". Accepted values: "minute","hour". |
Response
{
message: string;
data: TimeseriesAggregation;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Retrieve Server Pipeline
Endpoint
Retrieve queue depth, throughput, and error counts for a server over a time range.
/v1/projects/:project_id/servers/:server_id/pipeline Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
server_id | string | Unique identifier of the server. |
Query Parameters
Field | Type | Description |
|---|---|---|
start_at | | Start time (ISO format, default: 12 hours ago). |
end_at | | End time (ISO format, default: now). |
interval | string | Aggregation interval. Defaults to "minute". Accepted values: "minute","hour". |
Response
{
message: string;
data: TimeseriesAggregation;
status: 200;
error: null;
pagination: null;
endpoint: string;
} List Server Events
Endpoint
Retrieve the platform events recorded for a server's project over a time range.
/v1/projects/:project_id/servers/:server_id/events Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
server_id | string | Unique identifier of the server. |
Query Parameters
Field | Type | Requirement | Description |
|---|---|---|---|
start_at | | Required | Earliest event date and time to return (ISO format). |
end_at | | Required | Latest event date and time to return (ISO format). |
type | string | Optional | Filter by event type. Accepted values: "rollout". |
limit | number | Optional | Maximum number of items to return. Defaults to 25. Minimum: 1. Maximum: 200. |
after | string | Optional | Cursor from pagination.next_cursor of a previous response. Returns the resources after that page. |
before | string | Optional | Cursor from pagination.prev_cursor of a previous response. Returns the resources before that page. |
sort | string | Optional | Sort direction for the result set. Defaults to "desc". Accepted values: "asc","desc". |
Response
{
message: string;
data: ServerRolloutEvent[];
status: 200;
error: null;
pagination: Pagination;
endpoint: string;
} Referenced Types
ISODateString
An ISO 8601 date-time string returned at the JSON API boundary.