> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://contentful.com/developers/docs/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/_mcp/server. # Get organization usage GET https://api.contentful.com/organizations/{organization_id}/organization_periodic_usages **Deprecated. Sunset: 2027-02-28.** Use [Get aggregated usage](/references/content-management-api/usage/get-usage-aggregated) instead. See the [Usage migration guide](/references/content-management-api/usage-migration-guide) for a full mapping of parameters and response shapes.Query organization usage by `metric` for a given date range. If `startAt` and `endAt` are not passed through the query a historical data for the last 45 days will be returned by default. Reference: https://contentful.com/developers/docs/references/content-management-api/usage/get-organization-usage ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `organization_id` (string, required) — Id of organization ### Query parameters - `metric` (string, optional) — Comma separated list of API types (cma,cda,cpa,gql) - `startAt` (string, optional) — Date in `yyyy-mm-dd` format - `endAt` (string, optional) — Date in `yyyy-mm-dd` format - `order` (string, optional) — Order by `usage`. Default value is `"-usage"` and describes a descending usage order. ## Response ### 200 OK - Request successful - `map from string to any` ## Examples **Response** ```json { "items": [ { "dateRange": { "endAt": "2020-01-03", "startAt": "2020-01-01" }, "metric": "cma", "sys": { "id": "", "organization": { "sys": { "id": "0D9ZC8rLWiw6x5qizZGiRs", "linkType": "Organization", "type": "Link" } }, "type": "OrganizationPeriodicUsage" }, "unitOfMeasure": "apiRequestCount", "usage": 100, "usagePerDay": { "2020-01-01": 30, "2020-01-02": 30, "2020-01-03": 40 } } ], "limit": 25, "skip": 0, "sys": { "type": "Array" }, "total": 100 } ``` **SDK Code** ```android Android SDK currently doesn't implement this endpoint. ``` ```java Java SDK currently doesn't implement this endpoint. ``` ```kotlin Kotlin SDK currently doesn't implement this endpoint. ``` ```swift Swift We currently don't provide a CMA SDK for this platform. ``` ```js-legacy JavaScript (legacy) import { createClient } from 'contentful-management' const client = createClient({ accessToken: '' }, { type: 'legacy' }) client.getOrganizationUsage('', { skip: 0, limit: 10, 'metric[in]': 'cpa,gql', 'dateRange.startAt': '2020-01-05', 'dateRange.endAt': '2020-01-20' }) ``` ```javascript JavaScript import { createClient } from 'contentful-management' const client = createClient({ accessToken: '' }, { type: 'legacy' }) const usage = await client.usage.getManyForOrganization({ oganizationId: '', query: { skip: 0, limit: 10, 'metric[in]': 'cpa,gql', 'dateRange.startAt': '2020-01-05', 'dateRange.endAt': '2020-01-20' }, }); ``` ```php PHP SDK currently doesn't implement this endpoint. ``` ```ruby Ruby SDK currently doesn't implement this endpoint. ``` ```python Python SDK currently doesn't implement this endpoint. ``` ```.net .NET SDK currently doesn't implement this endpoint. ```