본문으로 건너뛰기
HTTP API워크스페이스

모든 창

요청 만들기

값을 바꾸면 명령이 함께 바뀝니다. 토큰은 여기에 입력하지 않습니다. 명령은 SPECTRE_LOCAL_API_TOKEN 환경 변수에서 토큰을 읽습니다. 자신의 터미널에서 실행하세요.

명령
curl 'http://127.0.0.1:48180/v1/workspace' \
  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
GET
/workspace

모든 창과 그 탭, 스택, 차트입니다. 빈 스택은 instrument와 connection_id가 null입니다. position은 스택 그룹 안에 숨겨진 스택의 경우 null입니다.

인증

bearerToken workspace:read
header인증Bearer <token>

Local API 토큰입니다: spt_와 16진수 문자 64개. Settings App → 일반 → Local API에서 복사합니다. Authorization 헤더로만 받습니다. 작업에 나열된 이름은 그 작업에 필요한 권한입니다. 터미널의 토큰에는 모든 권한이 있습니다.

권한: workspace:read

응답 본문

창의 레이아웃입니다.

application/json
  1. response
data*
요청 예제
curl 'http://127.0.0.1:48180/v1/workspace' \  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
응답 예제
{  "data": {    "windows": [      {        "id": 1,        "main": true,        "chart_window": false,        "focused": true,        "geometry": {          "x": 0,          "y": 0,          "width": 1920,          "height": 1080,          "maximized": true        },        "monitor": "DP-1",        "tabs": [          {            "id": 1,            "name": "XRP",            "active": true,            "stacks": [              {                "widget_id": 12,                "instrument": "binance:futures:XRPUSDT",                "connection_id": 25,                "empty": false,                "frozen": false,                "position": {                  "column": 0,                  "row": 1,                  "cell": 0                }              }            ],            "charts": [              {                "widget_id": 13,                "instrument": "binance:futures:XRPUSDT",                "connection_id": 25,                "interval": "5m",                "owner_widget_id": 12,                "position": {                  "column": 0,                  "row": 0,                  "cell": 0                }              }            ]          }        ]      }    ]  }}