Base URL#
All endpoints are under /api on https://api.structly.io. stly and the Web UI use the same API.
Find the endpoints for each tag on the pages under API reference in the left menu.
Authentication#
| Method | How to send | Catalog scope |
|---|---|---|
| Session cookie | The structly_session cookie set after login | The currently selected Organization |
| Agent token | Authorization: Bearer <token> header | The Organization the token belongs to |
- Authentication is checked before the path, method, and input.
- State-changing requests authenticated with a cookie must send an
Originequal to the server origin. Otherwise the response is 403FORBIDDEN_ORIGIN. - If the session has no current Organization the response is 409
ORGANIZATION_REQUIRED; if the Organization is awaiting verification it is 403ORGANIZATION_UNVERIFIED. - IDs that belong to another Organization return 404.
For using an Agent token with stly, see stly login and authentication.
Error responses#
Errors return these top-level fields together with the HTTP status.
| Field | Content |
|---|---|
code | A code in the {status}.000 format |
reason | A fixed identifier of the cause. Branch on this value |
message | A display message. Do not branch on its text |
data | An array of field errors. Empty when there are none |
{"code":"412.000","reason":"PRECONDITION_FAILED","message":"요청을 처리할 수 없습니다.","data":[]}- An
/apipath that is not documented returns 404ROUTE_NOT_FOUND; an unsupported method returns 405METHOD_NOT_ALLOWEDwith anAllowheader. - No response is cached (
Cache-Control: no-store).
ETag and If-Match#
A detail GET returns a strong ETag header. PUT and DELETE must send that value as a single If-Match header.
Without it the response is 428 PRECONDITION_REQUIRED; if another change was saved in the meantime it is 412 PRECONDITION_FAILED.
For how to handle conflicts, see Concurrent edit conflicts.
Reading the reference#
- Each tag page shows, for every endpoint, the method and path, authentication, parameters, request body, response statuses, and the success response body.
- Request and response body tables show top-level fields only. Nested objects are shown by type name.
- Descriptions are the original (Korean) text of the public contract.