Build virtual machine
POST/organizations/organization/virtual_machines/build
Builds a new virtual machine based on the arguments provided to this endpoint. Virtual machines will be built in the background. This task will return an task object that will allow you to monitor the build process using the appropriate API action. This action only offers a small subset of the full functionality needed when provisioning virtual machines - see the build_from_spec
action for a full advanced virtual machine creation method.
Scopes
virtual_machines
OAuth2 Scopes
When using OAuth2 authentication, scopes are prefixed with api.katapult.io/core/v1/
.
Request
- application/json
Body
Array [
]
Array [
]
Array [
]
organization
object
required
All 'organization[]' params are mutually exclusive, only one can be provided.
zone
object
All 'zone[]' params are mutually exclusive, only one can be provided.
data_center
object
All 'data_center[]' params are mutually exclusive, only one can be provided.
package
object
required
All 'virtual_machine_package[]' params are mutually exclusive, only one can be provided.
disk_template
object
All 'disk_template[]' params are mutually exclusive, only one can be provided.
disk_template_options
object[]
disks
object[]
Possible values: [ext4
, xfs
]
Default false. Exactly one disk must be marked as the system disk
io_profile
object
All 'io_profile[]' params are mutually exclusive, only one can be provided.
Possible values: [nvme
, ssd
]
network
object
All 'network[]' params are mutually exclusive, only one can be provided.
annotations
object[]
Responses
- 201
- 400
- 403
- 404
- 422
- 429
- 503
Builds a new virtual machine based on the arguments provided to this endpoint. Virtual machines will be built in the background. This task will return an task object that will allow you to monitor the build process using the appropriate API action. This action only offers a small subset of the full functionality needed when provisioning virtual machines - see the build_from_spec
action for a full advanced virtual machine creation method.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
task
object
required
Possible values: [pending
, running
, completed
, failed
]
build
object
required
Possible values: [draft
, failed
, pending
, complete
, building
]
virtual_machine_build
object
required
Possible values: [draft
, failed
, pending
, complete
, building
]
annotations
object[]
required
{
"task": {
"id": "string",
"name": "string",
"status": "pending"
},
"build": {
"id": "string",
"state": "draft"
},
"virtual_machine_build": {
"id": "string",
"state": "draft"
},
"hostname": "string",
"annotations": [
{
"key": "string",
"value": "string"
}
]
}
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
- OrganizationSuspendedSchema
- OrganizationNotActivatedSchema
- PermissionDeniedSchema
- ResourceCreationRestrictedSchema
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
An organization was found from the arguments provided but it was suspended
Possible values: [organization_suspended
]
An organization was found from the arguments provided but it wasn't activated yet
Possible values: [organization_not_activated
]
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
The organization chosen is not permitted to create resources
Possible values: [resource_creation_restricted
]
detail
ResourceCreationRestricted
{}
404 error response
- application/json
- Schema
- Example (from schema)
Schema
- OrganizationNotFoundSchema
- ZoneNotFoundSchema
- DataCenterNotFoundSchema
- VirtualMachinePackageNotFoundSchema
- DiskTemplateNotFoundSchema
- NetworkNotFoundSchema
oneOf
No organization was found matching any of the criteria provided in the arguments
Possible values: [organization_not_found
]
No zone was found matching any of the criteria provided in the arguments
Possible values: [zone_not_found
]
No data center was found matching any of the criteria provided in the arguments
Possible values: [data_center_not_found
]
No package was found matching any of the criteria provided in the arguments
Possible values: [package_not_found
]
No disk template was found matching any of the criteria provided in the arguments
Possible values: [disk_template_not_found
]
No network was found matching any of the criteria provided in the arguments
Possible values: [network_not_found
]
{}
422 error response
- application/json
- Schema
- Example (from schema)
Schema
- ValidationErrorSchema
- LocationRequiredSchema
- OneSystemDiskRequiredSchema
oneOf
A validation error occurred with the object that was being created/updated/deleted
Possible values: [validation_error
]
detail
ValidationError
A zone or a data_center argument must be provided
Possible values: [location_required
]
Exactly one disk must be marked as the system disk
Possible values: [one_system_disk_required
]
{}
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": {}
}