> 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/public-api/metrics.md).

# Metrics

High level metrics to track commitment performance.

## /metrics

> Retrieves key performance metrics for cloud commitments (RIs/SPs) for the specified provider. Returns financial data including lifetime and month-to-date savings, automation status, potential missed savings opportunities, commitment coverage, and utilization rates. This endpoint provides a comprehensive overview of commitment performance and automation status.

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"tags":[{"name":"Metrics","description":"High level metrics to track commitment performance."}],"paths":{"/v1/org/{org_id}/metrics":{"get":{"parameters":[{"in":"query","name":"provider","description":"Cloud provider to get metrics for","schema":{"type":"string","enum":["aws","azure","gcp"]},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicMetrics"}}}},"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"}},"tags":["Metrics"],"summary":"/metrics","description":"Retrieves key performance metrics for cloud commitments (RIs/SPs) for the specified provider. Returns financial data including lifetime and month-to-date savings, automation status, potential missed savings opportunities, commitment coverage, and utilization rates. This endpoint provides a comprehensive overview of commitment performance and automation status."}}},"components":{"schemas":{"PublicMetrics":{"type":"object","properties":{"lifetime_savings":{"type":"number"},"lifetime_gri_savings":{"type":"number"},"mtd_savings":{"type":"number"},"mtd_gri_savings":{"type":"number"},"purchase_automation_enabled":{"type":"boolean"},"buyback_automation_enabled":{"type":"boolean"},"has_actioned_plan":{"type":"boolean"},"has_pending_actions":{"type":"boolean"},"latest_execution_date":{"type":"string","format":"date"},"purchase_missed_savings":{"type":"number"},"buyback_missed_savings":{"type":"number"},"total_daily_missed_savings":{"type":"number"},"hourly_missed_savings":{"type":"number"},"missed_savings_start_date":{"type":"string","format":"date"},"missed_savings_end_date":{"type":"string","format":"date"},"expiring_savings":{"type":"number"},"coverage":{"type":"number"},"utilization":{"type":"number"}},"required":["buyback_automation_enabled","buyback_missed_savings","coverage","expiring_savings","has_actioned_plan","has_pending_actions","hourly_missed_savings","latest_execution_date","lifetime_gri_savings","lifetime_savings","missed_savings_end_date","missed_savings_start_date","mtd_gri_savings","mtd_savings","purchase_automation_enabled","purchase_missed_savings","total_daily_missed_savings","utilization"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{}},"detail":{},"code":{"type":["string","null"]},"status":{"type":"string"},"url":{"type":["string","null"]},"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"}}}}}}}
```


---

# 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/public-api/metrics.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.
