HTTP API워크스페이스
창 하나
요청 만들기
값을 바꾸면 명령이 함께 바뀝니다. 토큰은 여기에 입력하지 않습니다. 명령은 SPECTRE_LOCAL_API_TOKEN 환경 변수에서 토큰을 읽습니다. 자신의 터미널에서 실행하세요.
명령
curl 'http://127.0.0.1:48180/v1/workspace/windows/1' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
GET
bearerToken workspace:readheader
인증Bearer <token>Local API 토큰입니다: spt_와 16진수 문자 64개. Settings App → 일반 → Local API에서 복사합니다. Authorization 헤더로만 받습니다. 작업에 나열된 이름은 그 작업에 필요한 권한입니다. 터미널의 토큰에는 모든 권한이 있습니다.
권한: workspace:read
id*integerGET /workspace에 있는 창의 id입니다.
형식
int64범위
0 <= valueGET /workspace의 windows 요소와 같은 객체입니다.
application/json- response
data*curl 'http://127.0.0.1:48180/v1/workspace/windows/1' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"응답 예제
{ "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": [] } ] }}