> For the complete documentation index, see [llms.txt](https://docs.amigo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amigo.ai/api-reference/readme/platform/metric-store.md).

# Metric Store

## Setup Metric Store

> Trigger the fixed Metric Store setup job through the platform control plane.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"MetricStoreRunResponse":{"properties":{"run_id":{"type":"integer","title":"Run Id"}},"type":"object","required":["run_id"],"title":"MetricStoreRunResponse"}}},"paths":{"/v1/metric-store/setup":{"post":{"tags":["Metric Store"],"summary":"Setup Metric Store","description":"Trigger the fixed Metric Store setup job through the platform control plane.","operationId":"setup_metric_store_v1_metric_store_setup_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricStoreRunResponse"}}}}}}}}}
```

## Refresh Metric Store

> Trigger an on-demand canonical Metric Store refresh.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"MetricStoreRunResponse":{"properties":{"run_id":{"type":"integer","title":"Run Id"}},"type":"object","required":["run_id"],"title":"MetricStoreRunResponse"}}},"paths":{"/v1/metric-store/refresh":{"post":{"tags":["Metric Store"],"summary":"Refresh Metric Store","description":"Trigger an on-demand canonical Metric Store refresh.","operationId":"refresh_metric_store_v1_metric_store_refresh_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricStoreRunResponse"}}}}}}}}}
```

## Get Metric Store Run

> Read the Databricks status for a Metric Store setup or refresh run.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"MetricStoreRunStatusResponse":{"properties":{"run_id":{"type":"integer","title":"Run Id"},"life_cycle_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Life Cycle State"},"result_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result State"},"state_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Message"}},"type":"object","required":["run_id"],"title":"MetricStoreRunStatusResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/metric-store/runs/{run_id}":{"get":{"tags":["Metric Store"],"summary":"Get Metric Store Run","description":"Read the Databricks status for a Metric Store setup or refresh run.","operationId":"get_metric_store_run_v1_metric_store_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricStoreRunStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Setup Metric Store Legacy

> Deprecated workspace-shaped alias for the environment-level setup route.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"MetricStoreRunResponse":{"properties":{"run_id":{"type":"integer","title":"Run Id"}},"type":"object","required":["run_id"],"title":"MetricStoreRunResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/metric-store/setup":{"post":{"tags":["Metric Store"],"summary":"Setup Metric Store Legacy","description":"Deprecated workspace-shaped alias for the environment-level setup route.","operationId":"setup_metric_store_v1__workspace_id__metric_store_setup_post","deprecated":true,"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricStoreRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Refresh Metric Store Legacy

> Deprecated workspace-shaped alias for the environment-level refresh route.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"MetricStoreRunResponse":{"properties":{"run_id":{"type":"integer","title":"Run Id"}},"type":"object","required":["run_id"],"title":"MetricStoreRunResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/metric-store/refresh":{"post":{"tags":["Metric Store"],"summary":"Refresh Metric Store Legacy","description":"Deprecated workspace-shaped alias for the environment-level refresh route.","operationId":"refresh_metric_store_v1__workspace_id__metric_store_refresh_post","deprecated":true,"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricStoreRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get Metric Store Run Legacy

> Deprecated workspace-shaped alias for the environment-level run route.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"MetricStoreRunStatusResponse":{"properties":{"run_id":{"type":"integer","title":"Run Id"},"life_cycle_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Life Cycle State"},"result_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result State"},"state_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Message"}},"type":"object","required":["run_id"],"title":"MetricStoreRunStatusResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/metric-store/runs/{run_id}":{"get":{"tags":["Metric Store"],"summary":"Get Metric Store Run Legacy","description":"Deprecated workspace-shaped alias for the environment-level run route.","operationId":"get_metric_store_run_v1__workspace_id__metric_store_runs__run_id__get","deprecated":true,"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricStoreRunStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.amigo.ai/api-reference/readme/platform/metric-store.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
