Indices¶
List Indices¶
GET /indices
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | IndexCollection |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Create Index¶
POST /indices
Request body: IndexDocument
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | SavedIndex |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Calendars¶
GET /indices/calendars
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | CalendarList |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Preview Document¶
POST /indices/preview
Request body: PreviewDocumentRequest
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | PreviewResponse |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Rule Types¶
GET /indices/rule-types
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | RuleTypes |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Validate¶
POST /indices/validate
Request body: IndexDocument
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | ValidationReport |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Get Index¶
GET /indices/{index_id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
index_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | IndexDocument |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Put Index¶
PUT /indices/{index_id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
index_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Request body: IndexDocument
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | SavedIndex |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Delete Index¶
DELETE /indices/{index_id}
Remove a stored index definition, its optimised children, and the backtest results of every one of them.
The first cascade is deliberate (BN-157): results are keyed
backtest:{index_id}, and orphaning them would leave records
addressable by an id that no longer resolves -- the overview route
404s on the definition load before it ever reaches them.
The second is the owner's call for BN-168: an optimised index
references its source rather than copying it, so a child left behind
would be a methodology with no methodology — it could never be
calculated again. Each child goes through the identical cascade, and
the chain is followed recursively. The confirmation warning stays
client-side: documents carry source_index_id, so the UI computes the
blast radius from the catalogue before sending. This response then
says what actually went, which is what the client reports.
No refusal case: unlike universes, no index is seeded -- every stored definition was created by somebody, so every one may be deleted.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
index_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | IndexDeletion |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Optimise Index¶
POST /indices/{index_id}/optimise
Derive a new, optimised index from a stored one.
The UI's "Optimise" action on any index. Provenance is server-truth: the source is the index in the URL, and the body has no way to assert a parentage the server did not create.
The derived document inherits the parent's identity — base date, base value, currency, calendar, and the rebalancing cadence in particular, because the child solves exactly at the parent's published snapshots and a cadence of its own would have no parent weights at the extra dates (design record, default 2).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
index_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Request body: OptimiseRequest
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | SavedIndex |
| 409 | An index with the requested id already exists. | ErrorEnvelope |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Preview¶
POST /indices/{index_id}/preview
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
index_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Request body: PreviewRequest or null
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | PreviewResponse |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Schedule¶
GET /indices/{index_id}/schedule
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
index_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
asof |
query | string or null | no | Date to answer from, YYYY-MM-DD. Defaults to today. |
limit |
query | integer | no | Maximum dates per list, at most 512 and 4 by default. It bounds recent and upcoming separately rather than the two together, so a limit of 10 can return 20 dates. Raising it yields more history only: the lookahead is a separate bound, so it cannot produce further future dates. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | ScheduleView |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.