---
title: "Get a space's usage"
method: GET
path: "/v1/spaces/{spaceId}/usage"
tags: ["Spaces"]
---

# Get a space's usage

`GET /v1/spaces/{spaceId}/usage`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/spaces/{spaceId}/usage`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Returns what this space consumed — storage, compute, bandwidth, email, and function invocations — over the most recent settled measurement period. These numbers are measured by the infrastructure that serves the space, not derived from what was published, and they lag: the response carries the exact period it describes and when it was read, and nothing in it means "right now".

## Path parameters

- `spaceId` string, required

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` object, required
    - `spaceId` string, required: The space the usage was measured for.
    - `usage` object, nullable, required: Null when this space has never been measured, either because it has not served yet or because its first measurement period has not settled.
      - `period` object, required: The window these numbers describe.
        - `start` string, required: First instant of the measured period.
        - `end` string, required: Last instant of the measured period. The numbers are current as of here.
        - `resolution` 'hour' | 'day' | 'month', required: Length of the measured period.
      - `sampledAt` string, required: When the platform last read this space's usage from the serving infrastructure.
      - `storageBytes` number, required: Average bytes of disk the space occupied during the period. This is what storage is billed on: bytes actually on disk, not the size of what was uploaded.
      - `computeSeconds` number, required: Seconds of compute the space consumed during the period.
      - `bandwidthBytes` number, required: Bytes the space served during the period.
      - `emailCount` integer, required: Emails the space sent during the period.
      - `functionInvocations` integer, required: Function invocations during the period, counted where the space is known. Best-effort: counts are pushed after each request completes and may arrive late.
      - `functionErrors` integer, required: Function invocations during the period that ended in an error.

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

[API](https://skmtc.dev/spacefast/apis/spacefast-api.md) · [All operations](https://skmtc.dev/spacefast/apis/spacefast-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spacefast/apis/spacefast-api/revisions/bd165bc7c983?raw)
