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

# Anomalies (Beta)

Cost anomaly detection endpoints

## GET /beta/v1/org/{org\_id}/anomalies

> List the org's current cost anomalies, largest cost impact first.

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Anomalies (Beta)","description":"Cost anomaly detection endpoints"}],"paths":{"/beta/v1/org/{org_id}/anomalies":{"get":{"parameters":[{"in":"query","name":"provider","description":"Only this cloud provider (aws, azure, gcp). Omit for all.","schema":{"default":null,"type":"string","enum":["aws","azure","gcp",null],"nullable":true},"required":false},{"in":"query","name":"order_by","description":"Sort field: cost_impact (default), severity or start_date.","schema":{"type":"string","default":"cost_impact","enum":["start_date","cost_impact","severity"]},"required":false},{"in":"query","name":"desc","description":"Sort descending (default true).","schema":{"type":"boolean","default":true},"required":false},{"in":"query","name":"page","schema":{"type":"integer","default":1,"minimum":1},"required":false},{"in":"query","name":"page_size","schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AnomalyListItem"}}}},"headers":{"X-Pagination":{"$ref":"#/components/headers/PAGINATION"}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"$ref":"#/components/responses/UNPROCESSABLE_CONTENT"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"summary":"List the org's current cost anomalies, largest cost impact first.","tags":["Anomalies (Beta)"]}}},"components":{"schemas":{"AnomalyListItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Anomaly ID. Pass to the detail endpoint."},"provider":{"type":"string","description":"Provider."},"start_date":{"type":"string","format":"date","description":"First day of the anomaly."},"end_date":{"type":"string","format":"date","description":"Last day of the anomaly."},"detected_at":{"type":"string","format":"date-time","description":"When the pipeline detected it."},"anomaly_type":{"type":"string","description":"What spiked: Service, Account or Region."},"name":{"type":"string","description":"The service, account or region that spiked.","nullable":true},"description":{"type":"string","description":"One-line description of the spike.","nullable":true},"cost_impact":{"type":"number","description":"Dollars spent above forecast across the anomaly's days."},"cost_impact_pct":{"type":"number","description":"Peak-day overage over forecast, as a fraction (1.5 = +150%)."},"severity":{"description":"HIGH, MEDIUM or LOW, from how far the peak day rose above its forecast (ratio) combined with the dollars above forecast.","enum":["HIGH","MEDIUM","LOW"]}},"additionalProperties":false},"PaginationMetadata":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."},"first_page":{"type":"integer","description":"First available page number."},"last_page":{"type":"integer","description":"Last available page number."},"page":{"type":"integer","description":"Current page number."},"previous_page":{"type":"integer","description":"Previous page number."},"next_page":{"type":"integer","description":"Next page number."}},"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{}},"detail":{"nullable":true},"code":{"type":"string","nullable":true},"status":{"type":"string"},"url":{"type":"string","nullable":true},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["error","errors","message","timestamp","type"]},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{}},"error":{"type":"string"},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["error","errors","message","timestamp","type"],"additionalProperties":false}},"headers":{"PAGINATION":{"description":"Pagination metadata","schema":{"$ref":"#/components/schemas/PaginationMetadata"}}},"responses":{"UNPROCESSABLE_CONTENT":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```

## GET /beta/v1/org/{org\_id}/anomalies/metrics

> Count, total dollar impact and severity breakdown of the org's current anomalies.

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Anomalies (Beta)","description":"Cost anomaly detection endpoints"}],"paths":{"/beta/v1/org/{org_id}/anomalies/metrics":{"get":{"parameters":[{"in":"query","name":"provider","description":"Only this cloud provider (aws, azure, gcp). Omit for all.","schema":{"default":null,"type":"string","enum":["aws","azure","gcp",null],"nullable":true},"required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyMetrics"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"$ref":"#/components/responses/UNPROCESSABLE_CONTENT"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"summary":"Count, total dollar impact and severity breakdown of the org's current anomalies.","tags":["Anomalies (Beta)"]}}},"components":{"schemas":{"AnomalyMetrics":{"type":"object","properties":{"anomaly_count":{"type":"integer","description":"Number of current anomalies."},"total_impact":{"type":"number","description":"Sum of cost_impact over every anomaly, in dollars."},"highest_spike":{"type":"number","description":"Largest single anomaly's cost_impact, in dollars."},"severity_counts":{"description":"Anomaly count per severity.","allOf":[{"$ref":"#/components/schemas/AnomalySeverityCounts"}]}},"additionalProperties":false},"AnomalySeverityCounts":{"type":"object","properties":{"high":{"type":"integer"},"medium":{"type":"integer"},"low":{"type":"integer"}},"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{}},"detail":{"nullable":true},"code":{"type":"string","nullable":true},"status":{"type":"string"},"url":{"type":"string","nullable":true},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["error","errors","message","timestamp","type"]},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{}},"error":{"type":"string"},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["error","errors","message","timestamp","type"],"additionalProperties":false}},"responses":{"UNPROCESSABLE_CONTENT":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```

## GET /beta/v1/org/{org\_id}/anomalies/{anomaly\_id}

> One anomaly's impact, daily cost trend and root cause.

```json
{"openapi":"3.0.2","info":{"title":"Archera.ai Beta API","version":"v1.0.0"},"tags":[{"name":"Anomalies (Beta)","description":"Cost anomaly detection endpoints"}],"paths":{"/beta/v1/org/{org_id}/anomalies/{anomaly_id}":{"get":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"summary":"One anomaly's impact, daily cost trend and root cause.","tags":["Anomalies (Beta)"]}}},"components":{"schemas":{"AnomalyDetail":{"type":"object","properties":{"impact_summary":{"$ref":"#/components/schemas/AnomalyImpactSummary"},"anomaly_info":{"$ref":"#/components/schemas/AnomalyInfo"},"cost_trend":{"type":"array","description":"Daily cost around the anomaly, before and after it.","items":{"$ref":"#/components/schemas/AnomalyCostPoint"}},"anomaly_trend":{"type":"array","description":"The cost_trend days inside the anomaly.","items":{"$ref":"#/components/schemas/AnomalyCostPoint"}},"rca":{"description":"Root cause, or null while it has not been analyzed.","anyOf":[{"$ref":"#/components/schemas/AnomalyRootCause"},{"type":"object","nullable":true}]}},"additionalProperties":false},"AnomalyImpactSummary":{"type":"object","properties":{"cost":{"type":"number","description":"Dollars spent above forecast."},"cost_increase_pct":{"type":"number","description":"Peak-day overage over forecast, as a fraction."},"severity":{"description":"HIGH, MEDIUM or LOW, from how far the peak day rose above its forecast (ratio) combined with the dollars above forecast.","enum":["HIGH","MEDIUM","LOW"]},"dimensions":{"type":"array","items":{"$ref":"#/components/schemas/AnomalyDimension"}}},"additionalProperties":false},"AnomalyDimension":{"type":"object","properties":{"label":{"type":"string","description":"Service, Account or Region."},"value":{"type":"string","description":"Its name.","nullable":true}},"additionalProperties":false},"AnomalyInfo":{"type":"object","properties":{"description":{"type":"string","description":"One-line description."},"baseline_cost":{"type":"number","description":"Forecast cost on the peak day."},"current_cost":{"type":"number","description":"Actual cost on the peak day."},"overage_pct":{"type":"number","description":"Peak-day overage, as a fraction."},"peak_date":{"type":"string","format":"date","description":"Day of the highest overage."}},"additionalProperties":false},"AnomalyCostPoint":{"type":"object","properties":{"date":{"type":"string"},"cost":{"type":"number"}},"additionalProperties":false},"AnomalyRootCause":{"type":"object","properties":{"drivers":{"type":"array","description":"What drove the spike, largest first.","items":{"$ref":"#/components/schemas/AnomalyDriver"}},"anomaly_cost_impact":{"type":"number","description":"Dollars above forecast attributable to the listed drivers; can be less than the full impact."},"summary":{"type":"string","description":"Plain-English explanation of the cause.","nullable":true}},"additionalProperties":false},"AnomalyDriver":{"type":"object","properties":{"name":{"type":"string","description":"Usage type (for a Service anomaly) or service driving it."}},"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{}},"detail":{"nullable":true},"code":{"type":"string","nullable":true},"status":{"type":"string"},"url":{"type":"string","nullable":true},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["error","errors","message","timestamp","type"]},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{}},"error":{"type":"string"},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["error","errors","message","timestamp","type"],"additionalProperties":false}},"responses":{"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.archera.ai/api-reference/beta-api/anomalies-beta.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
