Indexes
The FastAPI Index surface manages identity and explores formulas, canonical
datasets, values, relationships, and delete impact. Formula mutation remains a
typed-library operation through FormulaIndex.
Routes
| Method | Path | Operation ID | Result |
|---|---|---|---|
GET |
/api/v1/index-type/ |
listIndexTypes |
Paginated type registry |
GET |
/api/v1/index-type/{index_type}/ |
getIndexType |
One type |
GET |
/api/v1/index/ |
listIndexes |
Counted Index page |
POST |
/api/v1/index/ |
createIndex |
New Index identity |
GET |
/api/v1/index/by-uids/ |
getIndexesByUids |
Batch lookup by uid |
GET |
/api/v1/index/{uid}/ |
getIndex |
One Index |
PATCH |
/api/v1/index/{uid}/ |
updateIndex |
Updated identity metadata |
DELETE |
/api/v1/index/{uid}/ |
deleteIndex |
Direct row deletion |
GET |
/api/v1/index/{uid}/summary/ |
getIndexSummary |
Detail summary |
GET |
/api/v1/index/{uid}/formulas/ |
listIndexFormulas |
Formula history |
POST |
/api/v1/index/{uid}/formulas/ |
saveIndexFormula |
Stored formula version |
POST |
/api/v1/index/{uid}/formulas/preview/ |
previewIndexFormula |
Unsaved formula as a tabular frame |
GET |
/api/v1/index/{uid}/formulas/{definition_uid}/ |
getIndexFormula |
Formula and exact inputs |
POST |
/api/v1/index/{uid}/formulas/{definition_uid}/activate/ |
activateIndexFormula |
Activated version |
POST |
/api/v1/index/{uid}/formulas/{definition_uid}/retire/ |
retireIndexFormula |
Retired version |
POST |
/api/v1/index/{uid}/formulas/{definition_uid}/preview/ |
previewStoredIndexFormula |
Stored formula as a tabular frame |
GET |
/api/v1/index/{uid}/datasets/ |
listIndexDatasets |
Per-Index dataset states |
GET |
/api/v1/index/{uid}/datasets/{meta_table_uid}/ |
getIndexDatasetSummary |
Selected dataset summary |
GET |
/api/v1/index/{uid}/datasets/{meta_table_uid}/values/ |
getIndexDatasetValuesFrame |
Bounded tabular frame |
GET |
/api/v1/index/{uid}/related-meta-tables/ |
listIndexRelatedMetaTables |
Filtered related MetaTables |
GET |
/api/v1/index/{uid}/delete-impact/ |
getIndexDeleteImpact |
FK impact summary |
GET |
/api/v1/asset/{uid}/related-meta-tables/ |
listAssetRelatedMetaTables |
Asset source-table discovery |
All operations are present in the Adapter from API contract. Create, update, delete, and the formula save, activate and retire routes are mutations; the previews are queries that persist nothing.
GET /api/v1/index/by-uids/?uid__in=<uid>&uid__in=<uid> is a bounded batch
lookup (ADR 0047): uid__in is repeated or comma-separated, at most 500, the
matching rows return in request order inside a ResourceCollection, unknown
uids are omitted, and there is no paging, search or discovery route.
include=<sidecar MetaTable uid> attaches provider sidecar rows under
includes[<uid>], as described for accounts.
Identity Payload
Create requires:
{
"unique_identifier": "USD-SWAP-10Y",
"index_type": "interest_rate",
"display_name": "USD 10Y Swap Rate",
"calculation_method": "custom",
"value_format": "percent",
"value_suffix": null
}
calculation_method is formula or custom. value_format is decimal or
percent; the optional suffix is presentation text. No provider, methodology
owner, result-unit registry, or effective-date field exists on identity.
Listing
GET /api/v1/index/ supports:
search, index_type, has_formula, has_canonical_values, cadence
limit, offset
The response is command-center.resource_collection@v1; UI metadata comes
from GET /api/v1/index/discovery/.
has_canonical_values and cadence query indexed availability metadata; they
do not scan each canonical table for distinct identifiers.
Formula Responses
Formula history returns version, status, validity, formula, policies, hash, and input count. Detail adds alignment parameters, metadata, and exact inputs:
{
"source_reference": {
"type": "index",
"identifier": "MXN-TIIE-28D"
},
"meta_table_uid": "11111111-1111-1111-1111-111111111111",
"observable": "price"
}
The response has no source key, resolver object, configurable identity/value columns, selectors, transforms, coefficients, or units.
Formula Lifecycle
Formula creation, lifecycle and preview go through msm.api.FormulaIndex
(ADR 0037, ADR 0038); the routes are thin wrappers that take the Index
identity from the stored row and record the acting identity (ADR 0047).
POST /api/v1/index/{uid}/formulas/with{"definition": ..., "inputs": [...]}persists one version throughFormulaIndex.upsert.definitionis anIndexFormulaDefinition(valid_from,formula,alignment_policy,alignment_parameters_json,missing_data_policy, optionalstatus,version,valid_to,metadata_json);inputsare the exact source bindings shown above. A definition identical to a stored version returns that version; otherwise the next monotonic version is stored asdraftunlessstatusasks foractiveorretired.400for a formula that fails the contract or an Index withcalculation_method="custom",404for an unknown Index or source,409when the row cannot be stored. Returns theIndexFormulaDetailwith201.POST /api/v1/index/{uid}/formulas/{definition_uid}/activate/activates a draft and retires the open predecessor atomically.POST /api/v1/index/{uid}/formulas/{definition_uid}/retire/retires a version atvalid_to(body, optional; now by default).POST /api/v1/index/{uid}/formulas/preview/with{"definition": ..., "inputs": [...], "start": ..., "end": ...}validates an unsaved formula, reads the pinned source MetaTables over the window throughTimeIndexTableRefand returns the calculated observations ascore.tabular_frame@v1(time_index,index_identifier,value,definition_uid,observation_status,source_as_of,metadata_json; timestamps as epoch milliseconds). Nothing is persisted.POST /api/v1/index/{uid}/formulas/{definition_uid}/preview/with{"start": ..., "end": ...}does the same for a stored version.
start and end must be timezone-aware and end later than start. A
definition uid that belongs to another Index is 404.
Related MetaTables
Asset and Index related-table routes accept:
numeric=true: require a numeric non-identity column;timestamped=true: require a registered time-indexed table.
Both default to true. False disables only that filter. Responses use the same
RelatedMetaTable schema. Relationships are proven by registered FK metadata;
column names alone are not accepted. Catalog discovery is paginated and does
not read source values.
Dataset States
Per-Index dataset listing returns:
populatedwhen reconciliation found rows;compatible_emptywhen a compatible query found none;unavailablewhen access or query failure prevented a count.
Compatible-empty rows are hidden unless include_empty=true. Unavailable rows
remain visible and are not represented as empty.
Bounded Values
Value requests require timezone-aware start and end, order=asc|desc, and
a limit from 1 to 5,000. The selected Index identifier is always applied as a
server-side dimension filter. The response is core.tabular_frame@v1.
Rows contain numeric value and optional provenance. Observation unit is not
part of the response; display formatting belongs to the Index identity.
Deletion
Deletion uses the same direct row API as other core resources:
DELETE /api/v1/index/{uid}/
It returns null on success and 404 when missing. Database CASCADE,
SET NULL, RESTRICT, and NO ACTION constraints govern relationships.
There is no signing secret, confirmation token, or deletion executor.
GET /delete-impact/ is read-only preflight metadata. It does not change the
delete operation.