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
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
reference_fields |
query | string or null | no | Reference columns to put on each row, comma-separated, such as 'name,sector,country_domicile', each as it stood on the row's date. Leave out for the name, asset class, sector and country; give an empty value for none. GET /data/fields lists the reference columns. |
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 and its optimised children.
The cascade follows from how an optimised index is stored: it
references its source rather than copying it, so a child left behind
would be a methodology with no methodology, and could never be
calculated again. 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.
One refusal: a stored strategy that holds the index, or any child
the cascade would take, answers 409 IN_USE with the strategies in
detail.used_by. A strategy is somebody's work rather than something
derived from the index, so it is never deleted with it, and since runs
belong to strategies, no run goes with an index either. Otherwise,
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.
Level¶
GET /indices/{index_id}/level
The index calculated on its own, with no backtest: its level, the headline figures of that level, and its weights at each rebalance. Through the cache a backtest uses, so either reuses the other's calculation over the same dates.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
index_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
start |
query | string or null | no | First date to calculate, YYYY-MM-DD. Defaults to the index's base date. |
end |
query | string or null | no | Last date to calculate, YYYY-MM-DD. Defaults to the last date the loaded data covers. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | IndexLevelView |
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.
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. |
reference_fields |
query | string or null | no | Reference columns to put on each row, comma-separated, such as 'name,sector,country_domicile', each as it stood on the row's date. Leave out for the name, asset class, sector and country; give an empty value for none. GET /data/fields lists the reference columns. |
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.