> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/api-reference/observability/billing-api/usage/usage-find-by-datacenter.md).

# Usage Find By Datacenter

Returns the usage of a contract for a given data-center

```json
{"openapi":"3.0.0","info":{"title":"IONOS CLOUD Billing API","version":"3.9.0"},"tags":[{"name":"Usage","description":"Usage data"}],"servers":[{"url":"https://api.ionos.com/billing","description":"Production API"}],"security":[{"basicAuth":[]},{"bearerAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"ContractParameter":{"name":"contract","in":"path","description":"Contract number","required":true,"schema":{"type":"integer","pattern":"[0-9]{5,10}"}},"DcParameter":{"name":"dc","in":"path","description":"Get data for the particular data-center ID (VDC UUID)","required":true,"schema":{"type":"string","nullable":true,"pattern":"^([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|null)$"}},"PeriodQueryParameter":{"name":"period","in":"query","description":"Period of interest in format YYYY-MM (current month by default if not specified)","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}}},"schemas":{"UsageDataCenter":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"location":{"type":"string"},"meters":{"type":"array","items":{"$ref":"#/components/schemas/UsageMeter"}}}},"UsageMeter":{"type":"object","properties":{"meterId":{"type":"string","description":"Usage meter product code","enum":["A01000","ALB1000","ALB1100","BU1100","BU1200","BU1300","BU1400","BU1500","C01000","C02000","C03000","CC1000","CR1000","CUBExxxx","CWSQL1001","CWSQL2001","CWSQL3001","CWSQL1000","CWSQL2000","DAS1000","DBPGB1000","DBPGC1000","DBPGR1000","DBPGS1000","DBPGS2000","DBPGS3000","NAT1000","NC1000","NLB1000","NLB1100","R01000","S01000","S02000","S03000","S05000","S3AU1100","S3AU1200","S3AU1300","S3RD1100","S3SU1100","S3SU1200","S3SU1300","S3TI1000","S3TI1100","S3TO1000","S3TO1100","S3TO1200","S3TO1300","S3TO1400","S3WR1100","TI1000","TO1000","WL1000","WL2000","WL3000","WL4000","WL5000","WL6000"]},"meterDesc":{"type":"string"},"quantity":{"type":"object","properties":{"quantity":{"type":"string"},"unit":{"type":"string"}}}}},"Metadata":{"type":"object","properties":{"contractId":{"type":"string"},"customerId":{"type":"string"},"reference":{"type":"string","nullable":true}}}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object"}}}},"NotFound":{"description":"The contract not found or doesn't belong to the user","content":{"application/json":{"schema":{"type":"object"}}}},"Unprocessable":{"description":"Wrong period format specified","content":{"application/json":{"schema":{"type":"object"}}}},"InternalError":{"description":"Unexpected internal server error","content":{"application/json":{"schema":{"type":"object"}}}}}},"paths":{"/{contract}/usage/{dc}":{"get":{"tags":["Usage"],"description":"Returns the usage of a contract for a given data-center","operationId":"usageFindByDatacenter","parameters":[{"$ref":"#/components/parameters/ContractParameter"},{"$ref":"#/components/parameters/DcParameter"},{"$ref":"#/components/parameters/PeriodQueryParameter"}],"responses":{"200":{"description":"Result data","content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"datacenters":{"type":"array","items":{"$ref":"#/components/schemas/UsageDataCenter"}},"metadata":{"$ref":"#/components/schemas/Metadata"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict when getting the invoice data for usage calculation","content":{"application/json":{"schema":{"type":"object"}}}},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```


---

# 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.ionos.com/cloud/api-reference/observability/billing-api/usage/usage-find-by-datacenter.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.
