Skip to Content
HTTP APIWorkspace

One window

Build your request

Change the values and the command follows. The token is never typed here: the command reads it from the SPECTRE_LOCAL_API_TOKEN environment variable. Run it in your own terminal.

Command
curl 'http://127.0.0.1:48180/v1/workspace/windows/1' \
  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
GET
/workspace/windows/{id}

Authorization

bearerToken workspace:read
headerAuthorizationBearer <token>

The Local API token: spt_ and 64 hex characters. Copy it from Settings App → General → Local API. It is accepted only in the Authorization header. The names listed with an operation are the scopes it requires. The token of the terminal carries all of them.

Scope: workspace:read

Path Parameters

id*integer

The id of a window from GET /workspace.

Formatint64
Range0 <= value

Response Body

The same object as an element of windows in GET /workspace.

application/json
  1. response
data*
Example Request
curl 'http://127.0.0.1:48180/v1/workspace/windows/1' \  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
Example Response
{  "data": {    "id": 1,    "main": true,    "chart_window": false,    "focused": true,    "geometry": {      "x": 0,      "y": 0,      "width": 1920,      "height": 1080,      "maximized": true    },    "monitor": null,    "tabs": [      {        "id": 1,        "name": "XRP",        "active": true,        "stacks": [],        "charts": []      }    ]  }}