Server Endpoints

The server API allows you to create, access, and terminate server instances programmatically.

Find a Server

Find a server by name.

GET /api/servers/:name

Request Parameters:

Parameter Type Description
name string name of the server

200 Response Body:

{
    "id": "string",
    "provider": "string",
    "state": "string",
    "name": "string",
    "image": "string",
    "region": "string",
    "size": "string",
    "address": "string",
    "capacity": "number",
    "secret": "string",
    "error": "string",
    "ca_key": "string",
    "ca_cert": "string",
    "ca_cert": "string",
    "tls_key": "string",
    "tls_cert": "string",
    "created": "number",
    "updated": "number",
    "started": "number",
    "stopped": "number"
}

List All Servers

List all servers.

GET /api/servers

Response Body:

[
    {
        "id": "string",
        "provider": "string",
        "state": "string",
        "name": "string",
        "image": "string",
        "region": "string",
        "size": "string",
        "address": "string",
        "capacity": "number",
        "secret": "string",
        "error": "string",
        "ca_key": "string",
        "ca_cert": "string",
        "ca_cert": "string",
        "tls_key": "string",
        "tls_cert": "string",
        "created": "number",
        "updated": "number",
        "started": "number",
        "stopped": "number"
    }
]

Provision a Server

Provision allocates a new server instance.

POST /api/servers

200 Response Body:

{
    "id": "string",
    "provider": "string",
    "state": "string",
    "name": "string",
    "image": "string",
    "region": "string",
    "size": "string",
    "address": "string",
    "capacity": "number",
    "secret": "string",
    "error": "string",
    "ca_key": "string",
    "ca_cert": "string",
    "ca_cert": "string",
    "tls_key": "string",
    "tls_cert": "string",
    "created": "number",
    "updated": "number",
    "started": "number",
    "stopped": "number"
}

Terminate a Server

Terminate stops and terminates a named server instance.

DELETE /api/servers/:name

Request Parameters:

Parameter Type Description
name string name of the server
force boolean force remove the instance