Assign disk to virtual machine
POST/disks/disk/assign
Assign a disk to a virtual machine.
Scopes
disks
OAuth2 Scopes
When using OAuth2 authentication, scopes are prefixed with api.katapult.io/core/v1/
.
Request
- application/json
Body
disk
object
required
virtual_machine
object
required
All 'virtual_machine[]' params are mutually exclusive, only one can be provided.
Responses
- 200
- 400
- 403
- 404
- 406
- 422
- 429
- 503
Assign a disk to a virtual machine.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
disk
object
required
Possible values: [not_built
, failed
, built
, building
, installing
, restoring
, formatting
, resizing
, configuring
, importing
]
Possible values: [nvme
, ssd
]
io_profile
object
nullable
Possible values: [scsi
, virtio
]
data_center
object
virtual_machine_disk
object
nullable
virtual_machine
object
Possible values: [detached
, failed
, attached
, attaching
, detaching
]
installation
object
nullable
disk_template_version
object
disk_template
object
operating_system
object
nullable
badge
object
nullable
attributes
object[]
{
"disk": {
"id": "string",
"name": "string",
"size_in_gb": 0,
"wwn": "string",
"state": "not_built",
"created_at": 0,
"storage_speed": "nvme",
"io_profile": {
"id": "string",
"name": "string",
"permalink": "string",
"speed_in_mb": 0,
"iops": 0
},
"bus_type": "scsi",
"data_center": {
"id": "string",
"name": "string",
"permalink": "string"
},
"virtual_machine_disk": {
"virtual_machine": {
"id": "string",
"fqdn": "string"
},
"attach_on_boot": true,
"boot": true,
"state": "detached"
},
"installation": {
"id": "string",
"disk_template_version": {
"id": "string",
"number": 0,
"stable": true,
"size_in_gb": 0,
"disk_template": {
"id": "string",
"name": "string",
"description": "string",
"permalink": "string",
"universal": true,
"size_in_gb": 0,
"operating_system": {
"id": "string",
"name": "string",
"badge": {
"url": "string",
"file_name": "string",
"file_type": "string",
"file_size": 0,
"digest": "string",
"token": "string"
}
}
}
},
"attributes": [
{
"key": "string",
"label": "string",
"value": "string",
"description": "string",
"protect": true
}
]
}
}
}
No API token was provided in the Authorization header. Ensure a token is provided prefixed with Bearer
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [missing_api_token
]
{
"code": "missing_api_token",
"description": "string",
"detail": {}
}
403 error response
- application/json
- Schema
- Example (from schema)
Schema
- UnauthorizedNetworkForAPITokenSchema
- InvalidAPITokenSchema
- InvalidCapabilitiesTokenSchema
- ScopeNotGrantedErrorSchema
- PermissionDeniedSchema
oneOf
Network is not allowed to access the API with this API token
Possible values: [unauthorized_network_for_api_token
]
detail
object
The IP address the request was received from
The API token provided was not valid (it may not exist or have expired)
Possible values: [invalid_api_token
]
detail
object
The capabilities token provided was not valid (either not valid, expired or not signed by the correct key)
Possible values: [invalid_capabilities_token
]
The scope required for this endpoint has not been granted to the authenticating identity
Possible values: [scope_not_granted
]
detail
ScopeNotGrantedError
The authenticated identity is not permitted to perform this action
Possible values: [permission_denied
]
detail
object
Additional information regarding the reason why permission was denied
{}
404 error response
- application/json
- Schema
- Example (from schema)
Schema
- DiskNotFoundSchema
- VirtualMachineNotFoundSchema
oneOf
No disk was found matching any of the criteria provided in the arguments
Possible values: [disk_not_found
]
No virtual machine was found matching any of the criteria provided in the arguments
Possible values: [virtual_machine_not_found
]
{}
The object found is in the trash and therefore cannot be manipulated through the API. It should be restored in order to run this operation.
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [object_in_trash
]
detail
object
trash_object
object
nullable
{
"code": "object_in_trash",
"description": "string",
"detail": {
"trash_object": {
"id": "string",
"keep_until": 0,
"object_id": "string",
"object_type": "string"
}
}
}
The disk can not be assigned to the virtual machine.
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [unable_to_assign
]
detail
UnableToAssign
{
"code": "unable_to_assign",
"description": "string",
"detail": {
"errors": [
"string"
]
}
}
You have reached the rate limit for this type of request
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [rate_limit_reached
]
detail
object
The total number of requests per minute that are permitted
{
"code": "rate_limit_reached",
"description": "string",
"detail": {
"total_permitted": 0
}
}
The service is currently unavailable, please try again later
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [service_unavailable
]
{
"code": "service_unavailable",
"description": "string",
"detail": {}
}