Volumes

Get Volumes

get

Get all storage volumes for a project

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
projectstringRequired
regionstring | nullableOptionalExample: us-central1-a
Responses
200

Successful Response

application/json
get
/v2/volumes
GET /v2/volumes?project=text HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "fid": "vol_abc123456",
    "name": "text",
    "region": "us-central1-a",
    "created_at": "2024-01-01T00:00:00Z",
    "capacity_gb": 2000,
    "project": "proj_abc123456",
    "interface": "Block",
    "bids": [
      "bid_abc123456"
    ],
    "reservations": [
      "res_abc123456"
    ],
    "attachments": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    }
  }
]

Create Volume

post

Create a new storage volume.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
namestring · max: 64RequiredPattern: ^[a-z]([-a-z0-9]*[a-z0-9])?$
projectstringRequiredExample: proj_abc123456
disk_interfacestring · enumRequiredPossible values:
regionstringRequiredExample: us-central1-a
size_gbinteger · max: 32000Required
Responses
post
/v2/volumes
POST /v2/volumes HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 104

{
  "name": "text",
  "project": "proj_abc123456",
  "disk_interface": "Block",
  "region": "us-central1-a",
  "size_gb": 1
}
{
  "fid": "vol_abc123456",
  "name": "text",
  "region": "us-central1-a",
  "created_at": "2024-01-01T00:00:00Z",
  "capacity_gb": 2000,
  "project": "proj_abc123456",
  "interface": "Block",
  "bids": [
    "bid_abc123456"
  ],
  "reservations": [
    "res_abc123456"
  ],
  "attachments": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

Delete Volume

delete

Delete a storage volume. Note that this will immediately delete the volume and make it irretrievable. This can only be done if the volume is not in use.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
volume_fidstringRequiredExample: vol_abc123456
Responses
delete
/v2/volumes/{volume_fid}
DELETE /v2/volumes/{volume_fid} HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Update Volume

patch

Update a storage volume's name.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
volume_fidstringRequiredExample: vol_abc123456
Body
namestring · max: 64RequiredPattern: ^[a-z]([-a-z0-9]*[a-z0-9])?$
Responses
200

Successful Response

application/json
patch
/v2/volumes/{volume_fid}
PATCH /v2/volumes/{volume_fid} HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
{
  "fid": "vol_abc123456",
  "name": "text",
  "region": "us-central1-a",
  "created_at": "2024-01-01T00:00:00Z",
  "capacity_gb": 2000,
  "project": "proj_abc123456",
  "interface": "Block",
  "bids": [
    "bid_abc123456"
  ],
  "reservations": [
    "res_abc123456"
  ],
  "attachments": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

Last updated