> 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 space usage GET https://api.contentful.com/organizations/{organization_id}/space_periodic_usages **Deprecated. Sunset: 2027-02-28.** Use [Get aggregated usage](/references/content-management-api/usage/get-usage-aggregated) with `filter[sys.dimensions.space.sys.id]={spaceId}` 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 space and `metric` for a given date range. Reference: https://contentful.com/developers/docs/references/content-management-api/usage/get-space-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": "", "space": { "sys": { "id": "yadj1kx9rmg0", "linkType": "Space", "type": "Link" } }, "type": "SpacePeriodicUsage" }, "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.getSpaceUsage('', { skip: 0, limit: 10, 'metric[in]': 'cda,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.getManyForSpace({ organizationId: '', { skip: 0, limit: 10, 'metric[in]': 'cda,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. ```