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

# List reservations

> Returns one page of the capacity reserved for your account: one entry per reserved set of hosts, with how many hosts are reserved and how many are held for you now. On-demand capacity is never listed, so an empty list means your account has no reservation. Reservations are arranged with Mount Thor; this operation reads them.

Service-account credentials are refused.



## OpenAPI

````yaml /api-reference/openapi/compute.json get /compute/v2/reservations
openapi: 3.0.3
info:
  title: Mount Thor Compute API
  version: 02a4a30e3ecb
  description: >-
    Create, list, inspect and delete virtual machines and bare-metal Macs, read
    the image and machine-class catalogs, see your reserved capacity and your
    account's compute profile, report machine problems to Mount Thor, and
    subscribe to machine events. Service-account credentials can list, create
    and delete machines, read the catalogs and the compute profile, and use
    event subscriptions. In an account whose Macs your organization manages,
    they can also read a Mac and use problem reports, and every one of these
    only as far as the account's capabilities allow. The other compute
    operations are for people using the `mthr` CLI or the portal. In an account
    whose Macs your organization manages, an operation outside its capabilities
    (see Get compute profile) answers 400 `tenant_compute_customer_managed`.
    Mount Thor names each machine. To change a machine's class or image, delete
    it and create a new one. Lists return one page at a time: pass
    `nextPageToken` back as `pageToken` until it comes back empty.
servers:
  - url: https://customer-api.mountthor.com
security:
  - bearerAuth: []
paths:
  /compute/v2/reservations:
    get:
      summary: List reservations
      description: >-
        Returns one page of the capacity reserved for your account: one entry
        per reserved set of hosts, with how many hosts are reserved and how many
        are held for you now. On-demand capacity is never listed, so an empty
        list means your account has no reservation. Reservations are arranged
        with Mount Thor; this operation reads them.


        Service-account credentials are refused.
      operationId: ComputeService_ListReservations
      parameters:
        - name: pageSize
          in: query
          description: >-
            The most reservations to return. 100 when omitted or 0; values above
            1000 return 1000.
          schema:
            type: integer
            format: uint32
        - name: pageToken
          in: query
          description: >-
            The `nextPageToken` of the previous page. Omit it for the first
            page.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListReservationsResponse'
        '400':
          description: >-
            `pageToken` is invalid (`invalid_page_token`) or has expired
            (`page_token_expired`; start again from the first page).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The credential is missing, invalid or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The credential does not allow this operation. `error.reason` is
            `machine_credential_not_supported` when the operation refuses
            service accounts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Too many requests for now. Event subscription operations are limited
            per account; retry after the number of seconds in `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Compute is temporarily unable to complete the request; retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ListReservationsResponse:
      type: object
      properties:
        reservations:
          type: array
          items:
            $ref: '#/components/schemas/Reservation'
          description: Up to `pageSize` reservations, ordered by name.
        nextPageToken:
          type: string
          description: Pass it as `pageToken` to get the next page. Empty on the last page.
      description: A page of reservations.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: The HTTP status code.
            status:
              type: string
              description: >-
                A short category name, for example `NotFound`, `InvalidArgument`
                or `FailedPrecondition`.
            reason:
              type: string
              description: >-
                A stable, machine-readable reason when one applies, for example
                `insufficient_funds` when a launch is refused for billing.
                Branch on this, not on `message`.
            message:
              type: string
              description: A human-readable explanation. Its wording can change.
    Reservation:
      type: object
      properties:
        name:
          readOnly: true
          type: string
          description: The reservation's name, chosen by Mount Thor.
        id:
          readOnly: true
          type: string
          description: >-
            The reservation's platform identifier. A reservation that is removed
            and made again gets a new one.
        kind:
          readOnly: true
          enum:
            - KIND_UNSPECIFIED
            - KIND_BARE_METAL
            - KIND_VIRTUAL_MACHINE
          type: string
          description: >-
            `KIND_BARE_METAL` for hosts rented whole as bare-metal Macs, or
            `KIND_VIRTUAL_MACHINE` for hosts that run virtual machines.
          format: enum
        machineClass:
          readOnly: true
          type: string
          description: The class of the reserved hosts, for example `m4-24g`.
        reservedHosts:
          readOnly: true
          type: integer
          description: How many hosts are reserved.
          format: uint32
        allocatedHosts:
          readOnly: true
          type: integer
          description: >-
            How many of the reserved hosts are held for you now. Below
            `reservedHosts` while hosts are being claimed or a renewal is
            refused, for example for funding; above it for a while after a
            reservation shrinks. Omitted when 0.
          format: uint32
        createdAt:
          readOnly: true
          type: string
          description: When the reservation was made.
          format: date-time
      description: >-
        Capacity held for your account: a number of hosts of one machine class,
        kept whether or not anything runs on them. Counts are whole Macs, not
        machines; a host reserved for virtual machines seats more than one.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <credential>` to
        https://customer-api.mountthor.com. People use the session that `mthr
        login` stores (a token starting `mt_session_`, valid for up to 12
        hours). Automation uses a service-account credential (starting
        `mt_sa_v1_`, valid for 90 days) from Create credential. Each operation
        names the permission it needs. Service accounts hold permissions through
        custom roles, and some operations refuse them; those operations say so.

````

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