v1
Double column
API
CLI
JS Client

Volumes /

List volumes

Gets a list of volumes belonging to the project

Required permission

Project > Volumes > General > Read

Path parameters

    • projectId

      string required
      ID of the project

Response body

  • {object}
    Response object.
    • data

      [array] required
      Result data.
      • {object}
        A volume object
        • id

          string required
          Identifier for the volume
        • name

          string required
          Volume name
        • tags

          [array] required
          An array of previously defined tags to help identify and group the resource.
          • string
            min length
            1
            max length
            100
            pattern
            ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$
        • spec

          (multiple options: oneOf) required
          Information about the desired size and type of the volume. Storage class is only configurable with the relevant feature flag enabled for your account.
        • attachedObjects

          [array]
          List of objects this volume is attached to.
          • {object}
            The object to attach this volume to.
            • id

              string required
              The id of object to attach this volume to.
              pattern
              ^[A-Za-z0-9-]+$
            • type

              string required
              The type of the object to attach this volume to.
              one of
              service
        • status

          string required
          Status the volume is in on the cluster
        • createdAt

          string required
          The timestamp the volume was created at
        • updatedAt

          string required
          The timestamp the volume was last updated at
    • pagination

      {object} required
      Data about the endpoint pagination.
      • hasNextPage

        boolean required
        Is there another page of results available?
      • cursor

        string
        The cursor to access the next page of results.
      • count

        number required
        The number of results returned by this request.
API
CLI
JS Client

GET /v1/projects/{projectId}/volumes

Example response

200 OK

The list of volumes.

JSON

{
  "data": [
    {
      "id": "example-volume",
      "name": "Example Volume",
      "tags": [
        "my-tag"
      ],
      "spec": {
        "storageClassName": "ssd",
        "storageSize": 4096
      },
      "attachedObjects": [
        {
          "id": "example-service",
          "type": "service"
        }
      ],
      "status": "BOUND",
      "createdAt": "2021-01-01 12:00:00.000Z",
      "updatedAt": "2021-01-01 12:00:00.000Z"
    }
  ],
  "pagination": {
    "hasNextPage": false,
    "count": 1
  }
}

© 2024 Northflank Ltd. All rights reserved.