Volumes
Get all storage volumes for a project
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
projectstringRequired
regionstring | nullableOptionalExample:
us-central1-aResponses
200
Successful Response
application/json
422
Validation Error
application/json
get
/v2/volumesGET /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 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_abc123456disk_interfacestring · enumRequiredPossible values:
regionstringRequiredExample:
us-central1-asize_gbinteger · max: 32000Required
Responses
201
Successful Response
application/json
422
Validation Error
application/json
post
/v2/volumesPOST /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 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_abc123456Responses
204
Successful Response
422
Validation Error
application/json
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 a storage volume's name.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
volume_fidstringRequiredExample:
vol_abc123456Body
namestring · max: 64RequiredPattern:
^[a-z]([-a-z0-9]*[a-z0-9])?$Responses
200
Successful Response
application/json
422
Validation Error
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