> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hivenet.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Read an instance's metrics

> Returns what one of your instances used over a recent time range: CPU,
memory, disks, network and GPUs.

Each metric is a series of points, **oldest first**, with one point per
step. The step depends on `range`:

| `range` | Window            | `step_seconds` | Points |
|---------|-------------------|----------------|--------|
| `1h`    | The last hour     | 60             | 61     |
| `6h`    | The last 6 hours  | 180            | 121    |
| `24h`   | The last 24 hours | 300            | 289    |
| `7d`    | The last 7 days   | 3600           | 169    |

A series with data has one point per step of the window, plus the
step that is still in progress, as `Points` shows. A series with no
data has no points.

A point covers the step that ends at its `unix_seconds`, and never
less than 3 minutes. Thus on the `1h` range, each point covers the 3
minutes that end at it. Each series says if its values are averages
or the highest value in the step. When the instance ran for only part
of a step, an average covers only the part when it ran. On a
Performance VM, when the instance stops and starts again in one step,
the averages of that step also include the time when it did not run.
Thus they are lower. On a container, the step it started in also
includes what it used while it started. The newest point is the step
that is still in progress, so its value can change on the next call.

On a GPU VM, a CPU VM or a container, `cpu_percent`, `in_mbps` and
`out_mbps` come from counters sampled about every 30 seconds, and
samples can be up to 2 minutes apart. Each value is the change between
samples divided by the time between those samples, not by the length
of the step. Thus steady use reads true, but a burst shorter than a
few minutes can read higher or lower than its average over the step,
and can appear one point late. For the same reason, `in_mbps` or
`out_mbps` multiplied by the step does not give the bytes transferred.

A step with no sample has `value: null`. A gap is never sent as `0`,
so a `0` is a measured zero.

Every field of the response is always present. A value that is not
known is `null`, never absent. The `status` of each group tells you
if the group has data at all; see `UsageStatus`.

An instance that does not exist and an instance that is not yours both
return `404`.




## OpenAPI

````yaml /public-v1.yaml get /instances/{id}/metrics
openapi: 3.0.3
info:
  title: Hive Compute Public API
  description: |
    The Hive Compute public API lets you manage compute instances
    programmatically, and browse the hardware presets and regions available to
    you.

    This release of the API covers creating, reading and controlling
    instances, the images you can launch, and registering the SSH key your
    instances use. To create an instance, pick a preset from `GET /presets`
    and an image from `GET /images`, register an SSH key once with
    `POST /ssh-keys`, then call `POST /instances`.

    **Base URL:** `https://api.hivecompute.ai/v1`

    ## Authentication

    Every endpoint requires an API key, sent as a Bearer token:

    ```
    Authorization: Bearer <your-api-key>
    ```

    API keys are issued manually at this release. Email
    [support@hivenet.com](mailto:support@hivenet.com) to request one. There is
    no self-service endpoint or console page for creating, listing or rotating
    keys yet; both will arrive in a later release.

    Treat the key as a password. It carries the full permissions of your
    account, does not expire on its own, and can only be replaced by contacting
    support.

    ## Scope

    Requests are scoped to the account the key belongs to. You can only see and
    act on your own instances and SSH keys. Regions and presets are the shared
    public catalogue and look the same to everyone. The images you can launch
    depend on the locations your account can use.

    ## Errors

    Every error shares one envelope:

    ```json
    {
      "error": {
        "code": "NOT_FOUND",
        "message": "Not found.",
        "request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      }
    }
    ```

    Quote `request_id` when contacting support: it identifies the exact request
    in our logs.

    Branch on `code`, never on `message`. Most messages are fixed strings
    chosen per status rather than a description of your particular request:
    `403` and `404` read the same every time, a `409` may say what to change
    (for example that a preset is sold out), and `401` has two fixed
    forms depending on whether the key was absent or rejected. Only
    `VALIDATION_ERROR` carries detail, and even there a malformed path id
    reports only that a UUID was expected, without naming the parameter. The
    underlying detail is internal; `request_id` is how we trace a specific
    failure.

    A request with no key gets `401`, unless its body is not valid JSON, its
    body is too large or its path cannot be decoded, which are rejected first.
    With a key, the format of the request is checked before the key itself: a
    malformed path id, or a parameter or body of the wrong type or out of
    range, gets `400` whether or not the key is valid. That `400` holds nothing
    about any account. Everything else is checked after the key, so an invalid
    key gets `401`.

    ## Rate limiting

    Requests are rate limited per API key, currently 60 requests per minute,
    with a separate budget for each endpoint. Calls to one endpoint do not use
    up another endpoint's budget, and a key counts the same wherever it calls
    from. Exceeding the limit returns `429` with a `Retry-After` header giving
    the number of seconds to wait. Treat the limit as subject to change and back
    off on `429` rather than pacing to a fixed number. The metrics endpoint
    shares one budget across instance IDs. Shared service protection can
    also return `429`. Use the delay in the response.

    ## Pagination

    Paginated endpoints return this envelope. `GET /regions` returns an array:

    ```json
    {
      "data": [],
      "pagination": { "next": "opaque-cursor", "size": 50 }
    }
    ```

    Pass `pagination.next` back as the `cursor` query parameter to fetch the
    following page. When it is `null` you have reached the last page. Cursors
    are opaque; do not construct or parse them.
  version: 1.0.0
  contact:
    name: Hive Compute Support
    email: support@hivenet.com
    url: https://hivenet.com
servers:
  - url: https://api.hivecompute.ai/v1
    description: Production
  - url: https://staging-api.hivecompute.ai/v1
    description: Staging
security:
  - bearerAuth: []
tags:
  - name: Instances
    description: >
      Compute instances are the core resource of the platform. Each instance

      runs a CPU or GPU workload on a hardware preset in a region, and moves

      through this lifecycle:


      `CREATED → DEPLOYED → STARTING → RUNNING → STOPPING → STOPPED →
      TERMINATING → TERMINATED`


      A stopped instance can be started again and keeps its storage. A

      terminated instance is gone permanently and cannot be recovered.
  - name: Catalogue
    description: |
      The regions and hardware presets available to launch instances on. This
      is shared public reference data, identical for every caller.
  - name: Images
    description: |
      The images an instance boots. A `vm` image is an operating system for a
      virtual machine. A `container` image is a template for a container
      instance: the Hive catalogue, or templates you saved yourself.
  - name: SSH keys
    description: |
      The public key you use to log in to your instances. Your account can
      hold more than one key. New instances get the key you registered last,
      whether through this API or in the console's Settings, and the console
      launches with that same key.
paths:
  /instances/{id}/metrics:
    get:
      tags:
        - Instances
      summary: Read an instance's metrics
      description: |
        Returns what one of your instances used over a recent time range: CPU,
        memory, disks, network and GPUs.

        Each metric is a series of points, **oldest first**, with one point per
        step. The step depends on `range`:

        | `range` | Window            | `step_seconds` | Points |
        |---------|-------------------|----------------|--------|
        | `1h`    | The last hour     | 60             | 61     |
        | `6h`    | The last 6 hours  | 180            | 121    |
        | `24h`   | The last 24 hours | 300            | 289    |
        | `7d`    | The last 7 days   | 3600           | 169    |

        A series with data has one point per step of the window, plus the
        step that is still in progress, as `Points` shows. A series with no
        data has no points.

        A point covers the step that ends at its `unix_seconds`, and never
        less than 3 minutes. Thus on the `1h` range, each point covers the 3
        minutes that end at it. Each series says if its values are averages
        or the highest value in the step. When the instance ran for only part
        of a step, an average covers only the part when it ran. On a
        Performance VM, when the instance stops and starts again in one step,
        the averages of that step also include the time when it did not run.
        Thus they are lower. On a container, the step it started in also
        includes what it used while it started. The newest point is the step
        that is still in progress, so its value can change on the next call.

        On a GPU VM, a CPU VM or a container, `cpu_percent`, `in_mbps` and
        `out_mbps` come from counters sampled about every 30 seconds, and
        samples can be up to 2 minutes apart. Each value is the change between
        samples divided by the time between those samples, not by the length
        of the step. Thus steady use reads true, but a burst shorter than a
        few minutes can read higher or lower than its average over the step,
        and can appear one point late. For the same reason, `in_mbps` or
        `out_mbps` multiplied by the step does not give the bytes transferred.

        A step with no sample has `value: null`. A gap is never sent as `0`,
        so a `0` is a measured zero.

        Every field of the response is always present. A value that is not
        known is `null`, never absent. The `status` of each group tells you
        if the group has data at all; see `UsageStatus`.

        An instance that does not exist and an instance that is not yours both
        return `404`.
      operationId: getInstanceMetrics
      parameters:
        - $ref: '#/components/parameters/InstanceId'
        - name: range
          in: query
          required: true
          description: |
            The time range to return, which also sets the step. The value is
            not case-sensitive: `24H` and `24h` are the same.
          schema:
            type: string
            enum:
              - 1h
              - 6h
              - 24h
              - 7d
      responses:
        '200':
          description: |
            The metrics of the instance over the range. The example shows only
            the two newest points of each series. A response has all the
            points.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstanceMetrics'
              example:
                step_seconds: 60
                last_sample_at: '2026-10-20T09:59:45.000Z'
                cpu_status: OK
                cpu_percent:
                  points:
                    - unix_seconds: 1792490400
                      value: 37.5
                    - unix_seconds: 1792490460
                      value: 41.2
                memory:
                  status: OK
                  used_bytes:
                    points:
                      - unix_seconds: 1792490400
                        value: 6442450944
                      - unix_seconds: 1792490460
                        value: 6576668672
                  limit_bytes: 34359738368
                  hard_limit_bytes: 36507222016
                disks:
                  - kind: VOLUME
                    label: /home/ubuntu
                    status: OK
                    used_bytes:
                      points:
                        - unix_seconds: 1792490400
                          value: 21474836480
                        - unix_seconds: 1792490460
                          value: 21475885056
                    total_bytes: 107374182400
                  - kind: CONTAINER_DISK
                    label: /
                    status: OK
                    used_bytes:
                      points:
                        - unix_seconds: 1792490400
                          value: 1073741824
                        - unix_seconds: 1792490460
                          value: 1074790400
                    total_bytes: 32212254720
                network:
                  status: OK
                  in_mbps:
                    points:
                      - unix_seconds: 1792490400
                        value: 12.4
                      - unix_seconds: 1792490460
                        value: 10.8
                  out_mbps:
                    points:
                      - unix_seconds: 1792490400
                        value: 3.1
                      - unix_seconds: 1792490460
                        value: 2.9
                  in_peak_mbps:
                    points: []
                  out_peak_mbps:
                    points: []
                  cap_mbps: 1000
                gpu_status: OK
                gpus:
                  - index: 0
                    model: RTX 4090
                    utilization_percent:
                      points:
                        - unix_seconds: 1792490400
                          value: 98
                        - unix_seconds: 1792490460
                          value: 97
                    memory_used_bytes:
                      points:
                        - unix_seconds: 1792490400
                          value: 20401094656
                        - unix_seconds: 1792490460
                          value: 20401094656
                    memory_total_bytes: 25757220864
                    temperature_celsius:
                      points:
                        - unix_seconds: 1792490400
                          value: 71
                        - unix_seconds: 1792490460
                          value: 72
                    power_watts:
                      points:
                        - unix_seconds: 1792490400
                          value: 402.5
                        - unix_seconds: 1792490460
                          value: 398
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/MetricsForbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/MetricsUnavailable'
components:
  parameters:
    InstanceId:
      name: id
      in: path
      required: true
      description: The instance's unique identifier.
      schema:
        type: string
        format: uuid
  schemas:
    InstanceMetrics:
      type: object
      description: |
        What one instance used over the requested range. A group that the
        instance does not have is present with status `NOT_APPLICABLE`.
      required:
        - step_seconds
        - last_sample_at
        - cpu_status
        - cpu_percent
        - memory
        - disks
        - network
        - gpu_status
        - gpus
      properties:
        step_seconds:
          type: integer
          format: int64
          description: |
            Seconds between two points of a series: 60, 180, 300 or 3600 for
            the `1h`, `6h`, `24h` and `7d` ranges.
          example: 60
        last_sample_at:
          type: string
          format: date-time
          nullable: true
          description: |
            The time of the newest CPU sample of the instance in the range. Use
            it to see if the instance reports at all. `null` when the range has
            no CPU sample.
        cpu_status:
          description: Whether `cpu_percent` has data.
          allOf:
            - $ref: '#/components/schemas/UsageStatus'
        cpu_percent:
          description: |
            CPU time used, as a percentage of the instance's vCPUs, from 0 to
            100. The average over each step.
          allOf:
            - $ref: '#/components/schemas/UsageSeries'
        memory:
          $ref: '#/components/schemas/MemoryUsage'
        disks:
          type: array
          description: |
            The disks the instance has, each with its own status. On a VM, the
            `ROOT_DISK` comes first. An instance with no known disk has an
            empty list.
          items:
            $ref: '#/components/schemas/DiskUsage'
        network:
          $ref: '#/components/schemas/NetworkUsage'
        gpu_status:
          description: |
            Whether `gpus` has data, for all the GPUs of the instance together.
            `NOT_APPLICABLE` on an instance with no GPU.
          allOf:
            - $ref: '#/components/schemas/UsageStatus'
        gpus:
          type: array
          description: |
            The GPUs that reported in the range. Empty when the instance has no
            GPU, or when no GPU of the instance reported. `gpu_status` tells
            which of the two applies. On a GPU VM, when one GPU reported, the
            list has all the GPUs of the instance. A container lists only the
            GPUs that reported. A Performance VM does not report GPU metrics,
            thus its list is always empty.
          items:
            $ref: '#/components/schemas/GpuUsage'
    UsageStatus:
      type: string
      enum:
        - OK
        - NOT_MONITORED
        - STALE
        - AGENT_NOT_INSTALLED
        - AGENT_NOT_RESPONDING
        - NOT_APPLICABLE
        - UNSPECIFIED
      description: |
        Whether a group of metrics has data.

        - `OK` — the group has at least one sample in the range.
        - `NOT_MONITORED` — nothing reports this group for the instance in the
          range.
        - `STALE` — the group has samples in the range, but none recently,
          and the instance is not stopped. Its source stopped reporting; the
          series shows since when.
        - `AGENT_NOT_INSTALLED` — GPUs of a VM only. The guest has no GPU
          agent to read from.
        - `AGENT_NOT_RESPONDING` — GPUs of a VM only. The GPU agent in the
          guest exists but does not answer.
        - `NOT_APPLICABLE` — the instance does not have this group, such as
          GPUs on a CPU-only instance, or any group on an inference instance.
        - `UNSPECIFIED` — no answer. It is not sent today.

        More values can come in a later release. Read `UNSPECIFIED`, and any
        value not in this list, as "unknown".
    UsageSeries:
      type: object
      description: |
        One point per step of the range, oldest first. All the series of a
        response that have points use the same timestamps. A series with no
        data has no points.
      required:
        - points
      properties:
        points:
          type: array
          items:
            $ref: '#/components/schemas/UsagePoint'
    MemoryUsage:
      type: object
      description: The RAM the instance used, against its limits.
      required:
        - status
        - used_bytes
        - limit_bytes
        - hard_limit_bytes
      properties:
        status:
          $ref: '#/components/schemas/UsageStatus'
        used_bytes:
          description: RAM used, in bytes. The highest value in each step.
          allOf:
            - $ref: '#/components/schemas/UsageSeries'
        limit_bytes:
          type: number
          nullable: true
          description: |
            The RAM the instance was sold with, in bytes. For a Performance
            VM, the RAM the VM actually has. `null` when not known.
          example: 34359738368
        hard_limit_bytes:
          type: number
          nullable: true
          description: |
            Containers only. The memory limit that the kernel applies to the
            container, in bytes. It is above `limit_bytes`, to leave headroom.
            `null` for VMs and for a container that has no such limit.
          example: 36507222016
    DiskUsage:
      type: object
      description: The space used on one disk.
      required:
        - kind
        - label
        - status
        - used_bytes
        - total_bytes
      properties:
        kind:
          $ref: '#/components/schemas/DiskKind'
        label:
          type: string
          description: |
            The name of the disk for display: `/`, `/home/ubuntu`, `vda`,
            `vdb`, or a mount point in the guest such as `/data` or `C:\`.
          example: /home/ubuntu
        status:
          $ref: '#/components/schemas/UsageStatus'
        used_bytes:
          description: |
            Space used, in bytes. The highest value in each step. It can have
            no points, with status `NOT_MONITORED`, while `total_bytes` is
            known.
          allOf:
            - $ref: '#/components/schemas/UsageSeries'
        total_bytes:
          type: number
          nullable: true
          description: |
            The size of the disk, in bytes. `kind` tells what it measures.
            `null` when not known.
          example: 107374182400
    NetworkUsage:
      type: object
      description: |
        Traffic into and out of the instance, in megabits per second (Mbps).
        1 Mbps is 1,000,000 bits per second.
      required:
        - status
        - in_mbps
        - out_mbps
        - in_peak_mbps
        - out_peak_mbps
        - cap_mbps
      properties:
        status:
          $ref: '#/components/schemas/UsageStatus'
        in_mbps:
          description: Traffic into the instance. The average over each step.
          allOf:
            - $ref: '#/components/schemas/UsageSeries'
        out_mbps:
          description: Traffic out of the instance. The average over each step.
          allOf:
            - $ref: '#/components/schemas/UsageSeries'
        in_peak_mbps:
          description: |
            `7d` range only: the highest 3-minute average of traffic into the
            instance in each step. It shows the bursts that the hourly average
            hides. It has no points on the other ranges.
          allOf:
            - $ref: '#/components/schemas/UsageSeries'
        out_peak_mbps:
          description: |
            `7d` range only: the highest 3-minute average of traffic out of
            the instance in each step. It has no points on the other ranges.
          allOf:
            - $ref: '#/components/schemas/UsageSeries'
        cap_mbps:
          type: number
          nullable: true
          description: |
            The bandwidth the instance was sold with, in Mbps. It is always
            `null` on a Performance VM. It is also `null` when we have no
            bandwidth on record for the instance.
          example: 1000
    GpuUsage:
      type: object
      description: |
        One GPU of the instance. In the step where a container restarts onto
        other GPUs, the values of the GPUs from before and after the restart
        can both count for that step.
      required:
        - index
        - model
        - utilization_percent
        - memory_used_bytes
        - memory_total_bytes
        - temperature_celsius
        - power_watts
      properties:
        index:
          type: integer
          description: |
            The position of the GPU in the instance, from 0. It is not the GPU
            number on the host, which can change when a container restarts.
          example: 0
        model:
          type: string
          description: The GPU model.
          example: RTX 4090
        utilization_percent:
          description: GPU use, from 0 to 100 percent. The average over each step.
          allOf:
            - $ref: '#/components/schemas/UsageSeries'
        memory_used_bytes:
          description: GPU memory used, in bytes. The highest value in each step.
          allOf:
            - $ref: '#/components/schemas/UsageSeries'
        memory_total_bytes:
          type: number
          nullable: true
          description: The memory of the GPU, in bytes. `null` when not known.
          example: 25757220864
        temperature_celsius:
          description: GPU temperature, in degrees Celsius. The highest value in each step.
          allOf:
            - $ref: '#/components/schemas/UsageSeries'
        power_watts:
          description: GPU power draw, in watts. The average over each step.
          allOf:
            - $ref: '#/components/schemas/UsageSeries'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - VALIDATION_ERROR
                - CONFLICT
                - TOO_MANY_REQUESTS
                - SERVICE_UNAVAILABLE
                - INTERNAL_ERROR
              description: Stable, machine-readable error code.
            message:
              type: string
              description: Human-readable explanation. Do not match on this text.
            request_id:
              type: string
              description: Identifies this request in our logs. Quote it to support.
    UsagePoint:
      type: object
      required:
        - unix_seconds
        - value
      properties:
        unix_seconds:
          type: integer
          format: int64
          description: The end of the step, as Unix time in seconds.
          example: 1792490400
        value:
          type: number
          format: double
          nullable: true
          description: |
            The value for the step, in the unit of its series. `null` when the
            step has no sample. Never NaN or infinite.
          example: 37.5
    DiskKind:
      type: string
      enum:
        - ROOT_DISK
        - VOLUME
        - CONTAINER_DISK
        - DATA_DISK
        - GUEST_FILESYSTEM
        - UNSPECIFIED
      description: |
        Which disk a `DiskUsage` describes.

        - `ROOT_DISK` — the main disk of a VM: labelled `/` on a GPU or CPU
          VM, and `vda` on a Performance VM.

          On a GPU or CPU VM, `total_bytes` is the disk size the VM was sold
          with. The filesystem on the disk is smaller, usually by a few
          percent, so a full disk reads below `total_bytes`.

          When the QEMU guest agent of the VM reported the filesystem that
          holds `/` in the range, `used_bytes` is that filesystem as the guest
          sees it, like `df`. These values lag and freeze as for
          `GUEST_FILESYSTEM`.

          If not, `used_bytes` is the host's view: the space that the disk
          image of the VM takes on its volume. It stays high after the guest
          deletes files, until the guest trims the free blocks.

          One source serves the whole response, so two ranges of one VM can
          use different sources. When the agent stops while the VM runs, the
          disk reads `STALE` on the ranges that still hold samples from the
          agent.

          A Windows guest has no `/`, so its `ROOT_DISK` is usually the
          host's view. On a GPU VM, its system drive also shows as a
          `GUEST_FILESYSTEM` such as `C:\`. On a Performance VM, this is the
          `vda` disk, with `total_bytes` only.
        - `VOLUME` — the persistent workspace volume of a container, labelled
          `/home/ubuntu`.
        - `CONTAINER_DISK` — the root filesystem of a container outside the
          workspace volume, labelled `/`. `used_bytes` is mostly the writable
          layer of the container and its logs. **When `used_bytes` goes above
          `total_bytes`, the container is evicted and all data on this disk is
          lost.**
        - `DATA_DISK` — an extra disk of a Performance VM, such as `vdb`.
          Like the `ROOT_DISK` of a Performance VM, it has `total_bytes` only:
          `used_bytes` has no points and `status` is `NOT_MONITORED`.
        - `GUEST_FILESYSTEM` — a filesystem mounted in the guest of a GPU VM,
          as its QEMU guest agent reports it, other than the one that holds
          `/`. These come after the `ROOT_DISK`. CPU VMs and Performance VMs
          never have them.

          `label` is the mount point, such as `/data`, or a Windows drive such
          as `C:\`. `total_bytes` is the newest capacity from the agent: the
          bytes used plus the bytes available to non-root users. Values can
          lag the guest by up to about 5.5 minutes. If the agent stops
          answering while the VM runs, they keep their last value.

          A filesystem mounted at several points shows one time. `/boot` and
          all below it, `/efi`, snaps, loop devices, CD-ROMs and the Windows
          System Reserved volume do not show. At most 8 show: the ones
          reported most recently. A filesystem unmounted while the VM runs
          reads `STALE` from then on.
        - `UNSPECIFIED` — an unknown kind. It is not sent today.

        More values can come in a later release. Read `UNSPECIFIED`, and any
        value not in this list, as "unknown".
  responses:
    ValidationError:
      description: The request was malformed or a parameter was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: VALIDATION_ERROR
              message: >-
                [{"property":"size","constraints":["size must not be greater
                than 200"]}]
              request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    Unauthorized:
      description: The API key is missing, malformed or not valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: Missing API token
              request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    MetricsForbidden:
      description: |
        Your account cannot use the API now, for example because it is
        suspended. For an instance that is not yours, this endpoint does not
        answer `403`. It answers `404`, as for an instance that does not
        exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: FORBIDDEN
              message: You do not have access to this resource.
              request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    NotFound:
      description: No such resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: NOT_FOUND
              message: Not found.
              request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    RateLimited:
      description: |
        Too many requests. Wait the number of seconds given in `Retry-After`
        before retrying.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: TOO_MANY_REQUESTS
              message: Too Many Requests
              request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    InternalError:
      description: |
        Something went wrong on our side. Retry, then contact support with the
        `request_id`.

        The `message` is deliberately generic and carries no detail about the
        cause. Quote the `request_id`, which identifies the underlying error in
        our logs.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INTERNAL_ERROR
              message: An internal error occurred.
              request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    MetricsUnavailable:
      description: |
        We cannot read the metrics now. The causes are: the metrics store or
        our database did not answer in time, or answered with an error, or
        this environment does not supply metrics. The message is the same for
        all the causes.

        Retry with backoff. If you get `503` for every instance and every
        range, and it does not stop, this environment does not supply
        metrics. Then stop retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: SERVICE_UNAVAILABLE
              message: The service is temporarily unavailable. Try again later.
              request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        An API key issued by Hive Compute support. See **Authentication**
        above for how to request one.

````

## Related topics

- [Get instance metrics](https://docs.hivenet.com/public-api/endpoints/get-instance-metrics.md)
- [Work with instances](https://docs.hivenet.com/public-api/work-with-instances.md)
- [Read an instance's logs](https://docs.hivenet.com/api-reference/instances/read-an-instances-logs.md)
- [Frequently asked questions](https://docs.hivenet.com/documentation/reference/faq.md)
- [How to start and stop your Compute instances](https://docs.hivenet.com/documentation/essentials/start-stop-instances.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.