Disks
API reference for Disks on CUDO Compute.
Reference
POST
Create disk
Body attributes
- Name
id
- Type
- string
- Description
- Name
dataCenterId
- Type
- string
- Description
- Name
sizeGib
- Type
- integer
- Description
- Name
storageClass
- Type
- string
- Description
Path attributes
- Name
disk.projectId
- Type
- string
- Description
Request
POST
/v1/projects/{disk.projectId}/disks
curl 'https://rest.compute.cudo.org/v1/projects/{disk.projectId}/disks' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"id": "string",
"dataCenterId": "string",
"sizeGib": "integer",
"storageClass": "string"
}'
GET
List disks
Path attributes
- Name
projectId
- Type
- string
- Description
- Name
pageNumber
- Type
- integer
- Description
- Name
pageSize
- Type
- integer
- Description
- Name
dataCenterId
- Type
- string
- Description
Request
GET
/v1/projects/{projectId}/disks
curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/disks' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
"disks": [
{
"id": "string",
"projectId": "string",
"dataCenterId": "string",
"vmId": "string",
"sizeGib": "integer",
"storageClass": "string",
"diskType": "string",
"publicImageId": "string",
"privateImageId": "string",
"createTime": "string",
"diskState": "string"
}
],
"totalCount": "integer",
"pageNumber": "integer",
"pageSize": "integer"
}
GET
Get disk
Path attributes
- Name
projectId
- Type
- string
- Description
- Name
id
- Type
- string
- Description
Request
GET
/v1/projects/{projectId}/disks/{id}
curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/disks/{id}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
Response
{
"disk": {
"id": "string",
"projectId": "string",
"dataCenterId": "string",
"vmId": "string",
"sizeGib": "integer",
"storageClass": "string",
"diskType": "string",
"publicImageId": "string",
"privateImageId": "string",
"createTime": "string",
"diskState": "string"
}
}
DELETE
Delete disk
Path attributes
- Name
projectId
- Type
- string
- Description
- Name
id
- Type
- string
- Description
Request
DELETE
/v1/projects/{projectId}/disks/{id}
curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/disks/{id}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'
PATCH
Resize a VM disk
Path attributes
- Name
projectId
- Type
- string
- Description
- Name
id
- Type
- string
- Description
- Name
diskId
- Type
- string
- Description
- Name
sizeGib
- Type
- integer
- Description
Request
PATCH
/v1/projects/{projectId}/vms/{id}/disks
curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/vms/{id}/disks' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'