Skip to content

Workstation information

A workstation (ws) reports RAM, processor and disk usage; the server calculates the percentages. See API usage information for authentication and the response envelope.

Add workstation

POST/add/ws

Creates a new workstation for the logged-in user and returns its id and token.

Request

Auth: api_key (query param or cookie) · Content-type: application/x-www-form-urlencoded

Request body:

Send the fields as form data.

Field name Description Type
ws_name Name of the workstation str
ws_type Free-text workstation type str
update_period Expected seconds between updates; used to decide Online/Offline int
ws_token [Optional] Token used to authenticate updates. Generated when omitted str
last_modified [Optional] Initial last-update time (epoch seconds). Default: now int

Request example:

https://spoilerinterface.com/interface/add/ws?api_key=3b9e1f0c7a5d4e2f8a6b0c1d

Form data:

ws_name=Build server&ws_type=Linux&update_period=120

Response

{
    "success": {
        "ws_id": 351659085216623,
        "ws_token": "9f2c4e7a1b3d5f60718293a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2"
    }
}

Field description

Field name Description Type
ws_id Generated workstation id. Use it with the token to push updates int
ws_token The supplied token, or a generated 100-character hex token str

Fails with Maximum number of devices reached. Please upgrade your account. when the account's device limit is reached.

Workstation count

GET/ws/count

Returns the number of workstations owned by the user.

Request

Auth: api_key (query param or cookie)

Request body:

None

Request example:

https://spoilerinterface.com/interface/ws/count?api_key=3b9e1f0c7a5d4e2f8a6b0c1d

Response

{
    "success": {
        "workstations": 2
    }
}

List workstations

GET/ws/list

Lists every workstation owned by the user, with its token and current status.

Request

Auth: api_key (query param or cookie)

Request body:

None

Request example:

https://spoilerinterface.com/interface/ws/list?api_key=3b9e1f0c7a5d4e2f8a6b0c1d

Response

{
    "success": [
        {
            "ws_id": 351659085216623,
            "ws_name": "Build server",
            "ws_type": "Linux",
            "ws_status": "Online",
            "ws_total_ram": 32.0,
            "ws_used_ram": 12.5,
            "ws_ram_used_per": 39.0625,
            "ws_total_proc": 100.0,
            "ws_used_proc": 23.0,
            "ws_proc_used_per": 23.0,
            "ws_total_disk": 512.0,
            "ws_used_disk": 300.0,
            "ws_disk_used_per": 58.59375,
            "ws_details": "{}",
            "update_period": 120,
            "last_modified": 1763025300,
            "ws_token": "9f2c4e7a1b3d5f60718293a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2",
            "notification_enabled": true,
            "alarms": [],
            "whatsapp_enabled": false,
            "sms_enabled": false,
            "ram_units": "GB",
            "disk_units": "GB",
            "proc_units": "%",
            "notification_users": []
        }
    ]
}

Field description

Field name Description Type
ws_id Workstation id int
ws_name Workstation name str
ws_type Workstation type str
ws_status Online or Offline str
ws_total_ram Total RAM float
ws_used_ram Used RAM float
ws_ram_used_per Used RAM in percent (calculated by the server) float
ws_total_proc Total processor capacity float
ws_used_proc Used processor capacity float
ws_proc_used_per Processor use in percent (calculated by the server) float
ws_total_disk Total disk float
ws_used_disk Used disk float
ws_disk_used_per Used disk in percent (calculated by the server) float
ws_details Details JSON as stored json
update_period Expected seconds between updates. The device is reported Offline when no update arrives within this period int
last_modified Epoch time (seconds) of the last update, shifted by the account's time_offset (minutes) int
ws_token Workstation token str
notification_enabled Email status notifications enabled. null in the database is reported as true by /status and /list bool
alarms Alarms configured for the device arr
whatsapp_enabled WhatsApp notifications enabled (may be null) bool
sms_enabled SMS notifications enabled (may be null) bool
ram_units Display units str
disk_units Display units str
proc_units Display units str
notification_users Extra notification recipients (see /edit) arr

ws_status is recalculated on every request: Online when the last update is within update_period seconds, otherwise Offline.

Workstation status

GET/ws/status

Returns the current status of a single workstation. Authenticated with the device id and token.

Request

Auth: Device id + token (no api_key) · Content-type: application/json (only when sending a JSON body)

Request body:

Send as query parameters or a JSON body.

Field name Description Type
ws_id Workstation id int
ws_token Workstation token str

Request example:

Params:

https://spoilerinterface.com/interface/ws/status?ws_id=351659085216623&ws_token=9f2c4e7a1b3d5f60718293a4

JSON body:

{
    "ws_id": 351659085216623,
    "ws_token": "9f2c4e7a1b3d5f60718293a4"
}

Response

{
    "success": {
        "ws_id": 351659085216623,
        "ws_name": "Build server",
        "ws_type": "Linux",
        "ws_status": "Online",
        "ws_total_ram": 32.0,
        "ws_used_ram": 12.5,
        "ws_ram_used_per": 39.0625,
        "ws_total_proc": 100.0,
        "ws_used_proc": 23.0,
        "ws_proc_used_per": 23.0,
        "ws_total_disk": 512.0,
        "ws_used_disk": 300.0,
        "ws_disk_used_per": 58.59375,
        "ws_details": "{}",
        "last_modified": 1763025300,
        "update_period": 120,
        "notification_enabled": true,
        "whatsapp_enabled": false,
        "sms_enabled": false,
        "ram_units": "GB",
        "disk_units": "GB",
        "proc_units": "%",
        "alarms": [],
        "notification_users": null
    }
}

Field description

Field name Description Type
ws_id Workstation id int
ws_name Workstation name str
ws_type Workstation type str
ws_status Online or Offline str
ws_total_ram Total RAM float
ws_used_ram Used RAM float
ws_ram_used_per Used RAM in percent (calculated by the server) float
ws_total_proc Total processor capacity float
ws_used_proc Used processor capacity float
ws_proc_used_per Processor use in percent (calculated by the server) float
ws_total_disk Total disk float
ws_used_disk Used disk float
ws_disk_used_per Used disk in percent (calculated by the server) float
ws_details Details JSON as stored json
last_modified Epoch time (seconds) of the last update, shifted by the account's time_offset (minutes) int
update_period Expected seconds between updates. The device is reported Offline when no update arrives within this period int
notification_enabled Email status notifications enabled. null in the database is reported as true by /status and /list bool
whatsapp_enabled WhatsApp notifications enabled (may be null) bool
sms_enabled SMS notifications enabled (may be null) bool
ram_units Display units str
disk_units Display units str
proc_units Display units str
alarms Alarms configured for the device arr
notification_users Extra notification recipients (see /edit) arr

Update workstation

POST/update/ws

Pushes new resource usage readings. The server calculates the *_used_per percentages.

Request

Auth: Device id + token (no api_key) · Content-type: application/json (only when sending a JSON body)

Request body:

Send as query parameters or a JSON body (query parameters win when both are present).

Field name Description Type
ws_id Workstation id int
ws_token Workstation token str
ws_total_ram Total RAM float
ws_used_ram Used RAM float
ws_total_proc Total processor capacity float
ws_used_proc Used processor capacity float
ws_total_disk Total disk float
ws_used_disk Used disk float
ws_details [Optional] JSON object as a string. Default {} json
epoch_time [Optional] Measurement time (epoch seconds). Default: server time. Stored as last_modified int

Request example:

Params:

https://spoilerinterface.com/interface/update/ws?ws_id=351659085216623&ws_token=9f2c4e7a1b3d5f60718293a4&ws_total_ram=32&ws_used_ram=12.5&ws_total_proc=100&ws_used_proc=23&ws_total_disk=512&ws_used_disk=300

JSON body:

{
    "ws_id": 351659085216623,
    "ws_token": "9f2c4e7a1b3d5f60718293a4",
    "ws_total_ram": 32.0,
    "ws_used_ram": 12.5,
    "ws_total_proc": 100.0,
    "ws_used_proc": 23.0,
    "ws_total_disk": 512.0,
    "ws_used_disk": 300.0,
    "ws_details": "{\"os\": \"Ubuntu 24.04\"}"
}

Response

{
    "success": "success"
}

Updates are rate limited by the owner's account type (account type 1 or unset: 59 s, types 2-4: 30 s, type 5 and above: 1 s between updates, measured against the previous last_modified). A blocked update returns HTTP 400:

{
    "failed": {
        "message": "Please wait for the update period to lapse. Remaining time is: 21",
        "remaining_time_sec": 21
    }
}

Workstation history

GET/ws/history

Returns the recorded history of the user's workstations, oldest record first.

Request

Auth: api_key (query param or cookie) · Content-type: application/json

Request body:

Send the filters as a JSON body. A body is required, even if it is only {} (without one the request fails). limit and offset may also be sent as query parameters, but min_epoch_tm_sec, max_epoch_tm_sec and device_id are only read from the JSON body.

Field name Description Type
min_epoch_tm_sec [Optional] Start of the window (epoch seconds). Default: now minus 2 days (172800 s) float
max_epoch_tm_sec [Optional] End of the window (epoch seconds). Default: now float
device_id [Optional] Return only this workstation (must belong to the user, otherwise Invalid device_id). Default: all of the user's workstations int
limit [Optional] Maximum records per device. Default and maximum: 20000 int
offset [Optional] Records to skip per device (for paging). Default: 0 int

Request example:

https://spoilerinterface.com/interface/ws/history?api_key=3b9e1f0c7a5d4e2f8a6b0c1d

JSON body:

{
    "min_epoch_tm_sec": 1762992000,
    "max_epoch_tm_sec": 1763078400,
    "device_id": 351659085216623,
    "limit": 1000,
    "offset": 0
}

Response

{
    "success": [
        {
            "ws_id": 351659085216623,
            "ws_name": "Build server",
            "ws_type": "Linux",
            "min_time": 1700000000,
            "max_time": 1763025300,
            "ram_units": "GB",
            "disk_units": "GB",
            "proc_units": "%",
            "data": [
                {
                    "ws_total_ram": 32.0,
                    "ws_used_ram": 12.5,
                    "ws_ram_used_per": 39.0625,
                    "ws_total_proc": 100.0,
                    "ws_used_proc": 23.0,
                    "ws_proc_used_per": 23.0,
                    "ws_total_disk": 512.0,
                    "ws_used_disk": 300.0,
                    "ws_disk_used_per": 58.59375,
                    "ws_details": "{}",
                    "update_time": "2026-11-13T09:15:00"
                }
            ]
        }
    ]
}

Field description

Field name Description Type
ws_id Workstation id int
ws_name Workstation name str
ws_type Workstation type str
min_time Earliest last_modified across all of the user's history records of this type (not only the requested window), plus the account's time_offset int
max_time Latest last_modified across all of the user's history records of this type, plus the account's time_offset int
ram_units Display units str
disk_units Display units str
proc_units Display units str
data History records in the requested window arr
has_more Present (true) only when the device returned 20000 records; request the next page with offset bool

Each data item:

Field name Description Type
ws_total_ram Total RAM float
ws_used_ram Used RAM float
ws_ram_used_per Used RAM in percent (calculated by the server) float
ws_total_proc Total processor capacity float
ws_used_proc Used processor capacity float
ws_proc_used_per Processor use in percent (calculated by the server) float
ws_total_disk Total disk float
ws_used_disk Used disk float
ws_disk_used_per Used disk in percent (calculated by the server) float
ws_details Details JSON as stored json
update_time Record time as an ISO date-time string, shifted by the account's time_offset str

When device_id is omitted, ws_type is currently the placeholder string TODO.

Edit workstation

POST/edit/ws

Changes the name, token, update period, display units or notification recipients of a workstation owned by the user.

Request

Auth: api_key (query param or cookie) · Content-type: application/json (only when sending a JSON body)

Request body:

Send as query parameters or a JSON body (query parameters win).

Field name Description Type
ws_id Workstation id (must belong to the user) int
ws_name [Optional] New name str
ws_token [Optional] New token. Devices must use the new token afterwards str
update_period [Optional] New update period (seconds) int
ram_units [Optional] Display units. Reset to an empty string when omitted str
disk_units [Optional] Display units. Reset to an empty string when omitted str
proc_units [Optional] Display units. Reset to an empty string when omitted str
notification_users [Optional] JSON string holding an array of extra notification recipients. Each item: email (required), name, status_alerts, threshold_alerts, sms_alerts, whatsapp_alerts (booleans) and mobile_number (required, + and country code, when sms_alerts or whatsapp_alerts is true). Omit it to keep the current list json

Request example:

https://spoilerinterface.com/interface/edit/ws?api_key=3b9e1f0c7a5d4e2f8a6b0c1d

JSON body:

{
    "ws_id": 351659085216623,
    "ws_name": "Build server",
    "update_period": 120,
    "ram_units": "GB",
    "disk_units": "GB",
    "proc_units": "%"
}

Response

{
    "success": "success"
}

Fails with Not allowed... when the device belongs to another user, and with Validation error in notification_users: ... when notification_users is invalid.

Delete workstation

POST/delete/ws

Deletes a workstation and all of its history records.

Request

Auth: api_key (query param or cookie) · Content-type: application/x-www-form-urlencoded

Request body:

Send the fields as form data.

Field name Description Type
ws_id Workstation id int
ws_token Workstation token str

Request example:

https://spoilerinterface.com/interface/delete/ws?api_key=3b9e1f0c7a5d4e2f8a6b0c1d

Form data:

ws_id=351659085216623&ws_token=9f2c4e7a1b3d5f60718293a4

Response

{
    "success": "success"
}

Only the owner can delete a device (Not allowed otherwise).

Notification settings

POST/notifications/{device_type}/{alert_type}/{action}

Enables or disables email, WhatsApp or SMS notifications for one workstation. Replaces the old per-type enable/disable endpoints.

Request

Auth: api_key (query param or cookie) and device id + token · Content-type: application/json (only when sending a JSON body)

Request body:

device_type is ws or workstation. alert_type is alerts (email status notifications, notification_enabled), whatsapp (whatsapp_enabled) or sms (sms_enabled). action is enable or disable.

Send the device credentials as query parameters or a JSON body.

Field name Description Type
device_id Workstation id int
device_token Workstation token str

URLs for this device type:

  • https://spoilerinterface.com/interface/notifications/ws/alerts/enable
  • https://spoilerinterface.com/interface/notifications/ws/alerts/disable
  • https://spoilerinterface.com/interface/notifications/ws/whatsapp/enable
  • https://spoilerinterface.com/interface/notifications/ws/whatsapp/disable
  • https://spoilerinterface.com/interface/notifications/ws/sms/enable
  • https://spoilerinterface.com/interface/notifications/ws/sms/disable

Request example:

https://spoilerinterface.com/interface/notifications/ws/alerts/disable?api_key=3b9e1f0c7a5d4e2f8a6b0c1d&device_id=351659085216623&device_token=9f2c4e7a1b3d5f60718293a4

JSON body (with ?api_key= in the URL or the cookie):

{
    "device_id": 351659085216623,
    "device_token": "9f2c4e7a1b3d5f60718293a4"
}

Response

{
    "success": "success"
}

The change is logged in the notification history (e.g. Notifications disabled). See Notifications for details and error messages.