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

# Licensing

Soda Cloud API Licensing Endpoints

## Get SPU consumption

> This endpoint returns the number of SPUs your organization consumed over a period.\
> \
> Both bounds are inclusive whole days and any time component is discarded:\
> \
> \- \`from\`: Optional. Defaults to the first day of the current calendar month.\
> \
> \- \`to\`: Optional. Defaults to today.\
> \
> Only organizations on SPU-based licensing accumulate consumption. Any other organization is refused with a 400 \`organisation\_not\_on\_spu\_plan\` error, so a zero total always means nothing was consumed over the period.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Authorization\
> \
> Users must have global role permission MANAGE\_ORGANISATION\_SETTINGS to execute this call.\
> \
> \## Tags\
> \
> \`Licensing\`\
> \
> \## Rate limiting\
> \
> 60 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Licensing Endpoints","name":"Licensing"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiSpuConsumptionResponse":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"spusConsumed":{"type":"integer","format":"int64"},"to":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/licensing/spuConsumption":{"get":{"description":"This endpoint returns the number of SPUs your organization consumed over a period.\n\nBoth bounds are inclusive whole days and any time component is discarded:\n\n- `from`: Optional. Defaults to the first day of the current calendar month.\n\n- `to`: Optional. Defaults to today.\n\nOnly organizations on SPU-based licensing accumulate consumption. Any other organization is refused with a 400 `organisation_not_on_spu_plan` error, so a zero total always means nothing was consumed over the period.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Authorization\n\nUsers must have global role permission MANAGE_ORGANISATION_SETTINGS to execute this call.\n\n## Tags\n\n`Licensing`\n\n## Rate limiting\n\n60 requests/60 seconds","operationId":"GET/api/v1/licensing/spuConsumption","parameters":[{"in":"query","name":"from","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"to","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiSpuConsumptionResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Get SPU consumption","tags":["Licensing"]}}}}
```


---

# 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.soda.io/reference/soda-apis/rest-api/licensing.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.
