Studio API
Studio 가 부르는 서버 API 입니다. 플러그인 개발에 직접 쓸 일은 없지만, 목록과 설치가 어떻게 동작하는지 알 수 있습니다.
인증
모든 요청은 Studio 라이선스 토큰을 Authorization: Bearer <token> 으로 보냅니다. 토큰이 없거나 만료되면 401 입니다.
플러그인 목록
GET
https://siteplan.kr/api/plugins/v1/catalog?platform=win-x64&host=1.4.0{
"schema": "siteplan-plugin-catalog-v1",
"platform": "win-x64",
"plugins": [
{
"id": "acme.batch-export",
"displayName": "Batch Export",
"publisher": "acme",
"version": "1.2.0",
"hostMin": "1.0.0",
"packageUrl": "https://siteplan.kr/api/plugins/v1/packages/acme.batch-export/1.2.0",
"sha256": "…",
"size": 482113,
"notes": "DXF 일괄 내보내기 추가",
"license": { "state": "trial", "planId": "pro", "daysLeft": 12, "expiresAt": "2026-12-20T03:00:00Z" },
"plans": [{ "id": "pro", "displayName": "Pro", "priceLabel": "33,000원 / 1년" }],
"purchaseUrl": "https://dev.siteplan.kr/plugins/acme.batch-export"
}
]
}상품마다 최신 게시 버전 하나가 나옵니다. license.state 는 none, trial, owned, expired 중 하나입니다. 목록은 화면 표시용이고, 실제 권한은 라이선스 토큰으로 확인합니다.
패키지 받기
GET
https://siteplan.kr/api/plugins/v1/packages/{id}/{version}게시본 zip 을 돌려줍니다. 응답 헤더 X-Content-SHA256 은 목록의 sha256 과 같습니다. 구매 전에도 받을 수 있고, 게시되지 않았거나 내려간 버전은 403 입니다.
건의 보내기
POST
https://siteplan.kr/api/suggestion/v1/itemsIdempotency-Key: 6f1d0c8e2b7a4c39a1e5f0b2d4c6e8a1
{ "target": "acme.batch-export", "body": "…", "appVersion": "1.4.0", "pluginVersion": "1.2.0" }| 응답 | 뜻 |
|---|---|
| 201 | 받음. { "suggestionId": "…" } |
| 400 | 형식 오류 또는 reason: empty, too_long, duplicate, abusive |
| 403 | 보낼 수 없는 계정 |
| 429 | 너무 잦음. Retry-After 초 뒤 다시 |