# Usage

## Retrieve All Usage

> Retrieves all usage associated to all SIMs which are connected to an account/organization.\
> \
> Using parameters will focus the records returned in the response.

```json
{"openapi":"3.0.0","info":{"title":"Onomondo's API","version":"1.0.0"},"servers":[{"url":"https://api.onomondo.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/usage":{"get":{"summary":"Retrieve All Usage","description":"Retrieves all usage associated to all SIMs which are connected to an account/organization.\n\nUsing parameters will focus the records returned in the response.","parameters":[{"name":"next_page","in":"query","schema":{"type":"string"},"description":"Used for pagination of records."},{"name":"limit","in":"query","schema":{"type":"string"},"description":"The max number of records returned. Limit can be between 1 and 1000 records. Default is 1000 records."},{"name":"offset","in":"query","description":"Number of records to skip (for pagination)","schema":{"type":"integer","minimum":0,"default":0}},{"name":"group","in":"query","schema":{"type":"string"},"description":"Used for grouping the records by hours or not"},{"name":"filter","in":"query","style":"deepObject","explode":true,"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":true,"description":"Filter usage based on various criteria. Can be provided as a single filter or multiple filters.\n\n**Single filter format**: `filter=key:value`\n\n**Multiple filters format**: `filter[]=key:value&filter[]=key2:value2`\n\nSupported filter types:\n\n**time** - Filter usage by time\n- Format: `time:2020-01-30` or `time:2020-01` or `time:2020`\n\n**sim_id** - Filter usage by SIM id\n- Format: `sim_id:000000001`\n\n**country_code** - Filter usage by country code\n- Format: `country_code:dk`\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## Retrieve Usage of specific SIM

> Retrieves usage associated to a specific SIM connected to an account/organization.\
> \
> Using parameters will focus the records returned in the response.

```json
{"openapi":"3.0.0","info":{"title":"Onomondo's API","version":"1.0.0"},"servers":[{"url":"https://api.onomondo.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/usage/{sim_id}":{"get":{"summary":"Retrieve Usage of specific SIM","description":"Retrieves usage associated to a specific SIM connected to an account/organization.\n\nUsing parameters will focus the records returned in the response.","parameters":[{"name":"sim_id","in":"path","schema":{"type":"string"},"required":true},{"name":"next_page","in":"query","schema":{"type":"string"},"description":"Used for pagination of records."},{"name":"limit","in":"query","schema":{"type":"string"},"description":"The max number of records returned. Limit can be between 1 and 1000 records. Default is 1000 records."},{"name":"offset","in":"query","description":"Number of records to skip (for pagination)","schema":{"type":"integer","minimum":0,"default":0}},{"name":"group","in":"query","schema":{"type":"string"},"description":"Used for grouping the records by hours or not"},{"name":"filter","in":"query","style":"deepObject","explode":true,"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"Filter usage based on various criteria. Can be provided as a single filter or multiple filters.\n\n**Single filter format**: `filter=key:value`\n\n**Multiple filters format**: `filter[]=key:value&filter[]=key2:value2`\n\nSupported filter types:\n\n**time** - Filter usage by time\n- Format: `time:2020-01-30` or `time:2020-01` or `time:2020`\n\n**country_code** - Filter usage by country code\n- Format: `country_code:dk`\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## Retrieve total usage by Tag

> Retrieves all usage associated to all SIMs connected to an account/organization.\
> \
> Using parameters will focus the records returned in the response.

```json
{"openapi":"3.0.0","info":{"title":"Onomondo's API","version":"1.0.0"},"servers":[{"url":"https://api.onomondo.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/usage/tag-total/{tag_id}":{"get":{"summary":"Retrieve total usage by Tag","description":"Retrieves all usage associated to all SIMs connected to an account/organization.\n\nUsing parameters will focus the records returned in the response.","parameters":[{"name":"tag_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.onomondo.com/readme/usage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
