Vai al contenuto principale
Version: v0.1.0

Hikube API

Manage the resources of the Hikube platform.

Errors​

An error response carries an HTTP status for the class of the error and a JSON body (ErrorResponse) whose code identifies the precise error:

{"requestId": "4bf92f3577b34da6a3ce929d0e0e4736", "code": 20101, "message": "invalid name: must be at least 3 characters", "details": []}

A code reads as a service prefix followed by three digits: 001–099 are platform errors (not found, already exists, unavailable…), 100–199 invalid input, 200–299 business rules. Handle errors on code: the wording of message may change.

Common​

CodeError
10001Authentication failed: invalid bearer token
10002Permission denied: missing or invalid credentials, or credentials that do not allow this operation
10003Event stream ticket expired
10004The api-key could not be checked (temporary); retry, the key is not known to be invalid
10005Refused by a platform admission policy; the message names the field, details the policy and its reason
10006Invalid update_mask: a path names no updatable field, or one key of a collection

Instance​

CodeError
20001Instance not found
20002Instance already exists
20003Permission denied on the instance
20004Instance modified concurrently; retry
20005Instance platform unavailable
20006Instance provisioning failed
20007A dependency of the instance is not ready
20008The disks of the instance could not be read
20009A disk of the instance could not be created or updated
20100Invalid project_id
20101Invalid instance name
20102Invalid instance_type
20103Unknown instance_type
20104Invalid image, or image missing while the first disk has none
20105Unknown cloud image
20106disks is required
20107Invalid disk name
20108Invalid disk size
20109Duplicate disk name
20110Invalid SSH key
20111Invalid port number (above 65535)
20112Unknown GPU type
20113VPC not found in the project
20114The instance type has too little RAM for a GPU (4 GiB minimum)
20115User data cannot be set on a Windows instance: the platform generates it
20200Disk already attached to another instance
20201Instance already running
20202Instance already stopped
20203Instance cannot be restarted in its current state
20204GPU type not available
20205Not enough GPUs available to start the instance
20206No public IPv4 address available
20207No single node can host all the requested GPUs
20208The system disk of an instance cannot be replaced, detached or moved

Disk​

CodeError
30001Disk not found
30002Disk already exists
30003Permission denied on the disk
30005Disk platform unavailable
30006Disk provisioning failed
30007Disk attached to an instance
30100Invalid project_id
30101Invalid disk name
30102Invalid disk size
30103Unknown cloud image
30104Invalid custom image URL
30105Invalid custom image OS
30200Disk cannot be shrunk
30201Disk detached but still used by a running instance until it restarts

Project​

CodeError
40001Project not found
40002Project already exists
40003Permission denied on the project
40005Project platform unavailable
40006Project provisioning failed
40100Invalid organization_id
40101Invalid project name
40102Invalid hostname
40103Invalid CPU quota
40104Invalid memory quota
40105Invalid storage quota
40200etcd cannot be disabled while Kubernetes clusters exist
40201A quota cannot be lowered below current usage
40202A quota cannot exceed what the organization has left

Bucket​

CodeError
50001Bucket not found
50002Bucket already exists
50003Permission denied on the bucket
50005Bucket platform unavailable
50010Bucket user not found
50011Bucket user already exists
50100Invalid project_id
50101Invalid bucket name
50102Invalid bucket username

IAM​

CodeError
60001User not found
60002User already exists
60003Permission denied, including an api-key scope above the caller's own
60005IAM platform unavailable
60006Api-key not found
60007Api-key store failure; retrying is safe
60008Api-keys are not enabled
60009Api-key limit of the project reached
60100Invalid organization_id
60101Invalid username
60102Invalid email
60103Invalid first name
60104Invalid last name
60105Invalid project_id
60106Invalid api-key scope
60107Invalid api-key id
60108Invalid api-key name
60109Invalid api-key validity

Organization​

CodeError
60001Organization not found
60100Invalid organization_id

Kubernetes​

CodeError
70001Cluster not found
70002Cluster already exists
70003Permission denied on the cluster
70005Kubernetes platform unavailable
70006Cluster provisioning failed
70100Invalid project_id
70101Invalid cluster name
70102Invalid version
70103Unsupported Kubernetes version
70104Invalid control plane replicas
70105Node groups are required
70106Invalid node group name
70107Unknown node group instance_type
70108Invalid node group replicas
70109max_replicas lower than min_replicas
70110Unknown GPU type
70111Unknown control plane preset
70112Invalid hostname
70113Invalid node group storage size
70200GPU type not available
70201No public IPv4 address available
70202No single node can host the GPUs of a node group
70203An addon is enabled without the addon it requires
70204GPUs cannot be added to or all removed from an existing node group
70205Project datastore being provisioned: retry later
70206Version downgrade refused
70207Project etcd disabled by GitOps: do not retry
70208Project etcd failed to deploy: do not retry

Postgres​

CodeError
80001Cluster not found
80002Cluster already exists
80003Permission denied on the cluster
80005Postgres platform unavailable
80006Cluster provisioning failed
80100Invalid project_id
80101Invalid cluster name
80102Invalid or unsupported version
80103Invalid replicas
80104Invalid storage size
80105Invalid database name
80106Invalid max_connections
80107Invalid quorum configuration
80108Unknown preset
80109Unknown extension
80150Invalid username
80151Unknown user role
80152Unknown database role
80200Password generation failed
80201The cluster mode cannot be changed after creation
80202No public IPv4 address available
80203Version downgrade refused
80204Storage cannot be shrunk
80205Cluster has nothing to restart yet (still provisioning): retry once it is provisioned

Account​

CodeError
90001Account not found
90005Account service unavailable

MariaDB​

CodeError
110001Cluster not found
110002Cluster already exists
110003Permission denied on the cluster
110005MariaDB platform unavailable
110006Cluster provisioning failed
110100Invalid project_id
110101Invalid cluster name
110102Invalid or unsupported version
110103Invalid replicas
110104Invalid storage size
110105Invalid database name
110106Invalid max_user_connections
110107Unknown preset
110150Invalid username
110151Unknown database role
110200Password generation failed
110201The cluster mode cannot be changed after creation
110202No public IPv4 address available
110203Version downgrade refused
110204Storage cannot be shrunk
110205Cluster has nothing to restart yet (still provisioning): retry once it is provisioned

Redis​

CodeError
120001Cluster not found
120002Cluster already exists
120003Permission denied on the cluster
120005Redis platform unavailable
120006Cluster provisioning failed
120100Invalid project_id
120101Invalid cluster name
120102Invalid or unsupported version
120103Invalid replicas
120104Invalid storage size
120105Unknown preset
120200Password generation failed
120201The cluster mode cannot be changed after creation
120202No public IPv4 address available
120203Version downgrade refused
120204Storage cannot be shrunk
120205Cluster has nothing to restart yet (still provisioning): retry once it is provisioned
120206Password rotation refused: authentication is disabled on the cluster
120207Password rotation refused: authentication was just enabled and is still being set up, retry in a few seconds

RabbitMQ​

CodeError
140001Cluster not found
140002Cluster already exists
140003Permission denied on the cluster
140005RabbitMQ platform unavailable
140006Cluster provisioning failed
140100Invalid project_id
140101Invalid cluster name
140102Invalid replicas
140103Invalid storage size
140104Invalid or unsupported version
140105Unknown preset
140150Invalid username
140160Invalid vhost name
140161Unknown vhost role
140200Password generation failed
140201The cluster mode cannot be changed after creation
140202No public IPv4 address available
140203Version downgrade refused
140204Storage cannot be shrunk
140205Cluster has nothing to restart yet (still provisioning): retry once it is provisioned

MongoDB​

CodeError
150001Cluster not found
150002Cluster already exists
150003Permission denied on the cluster
150005MongoDB platform unavailable
150006Cluster provisioning failed
150100Invalid project_id
150101Invalid cluster name
150102Invalid or unsupported version
150103Invalid replicas
150104Invalid storage size
150105Invalid database name
150106Invalid sharding configuration
150107Unknown preset
150150Invalid username
150151Unknown database role
150200Password generation failed
150201The cluster mode cannot be changed after creation
150202No public IPv4 address available
150203Version downgrade refused
150204Storage cannot be shrunk
150205Cluster has nothing to restart yet (still provisioning): retry once it is provisioned

Network​

CodeError
160001VPC not found
160002VPC already exists
160003VPC used by instances; detach them first
160005Network platform unavailable
160010Subnet not found
160011Subnet already exists
160012Subnet used by instances; detach them first
160100Invalid project_id
160101Invalid VPC name
160150Invalid subnet name
160151Invalid CIDR
160152CIDR overlaps another subnet or a reserved range
160153CIDR is not a private range
160154CIDR is not IPv4

Billing​

CodeError
170100Unknown currency

Backup​

CodeError
180001Destination not found
180002Plan not found
180003Backup run not found
180004Backup not found
180005Restore not found
180006Destination already exists
180007Plan already exists
180008Conflict: a name taken in the same second, or a concurrent change
180009Platform unavailable
180010Provisioning failed
180011Bucket not found in the project
180012Bucket user not found on the bucket
180013Application not found
180014Teardown incomplete: delete the destination again
180015Cancellation incomplete: cancel again to finish
180100project_id missing
180101Invalid destination name
180102Invalid plan name
180103Retention out of range
180105Schedule cannot be parsed, is an interval, or names a time zone
180106Schedule fires more than once an hour
180107Kind with no backup driver
180108Malformed recovery time, or combined with a restore point
180109Destructive confirmation missing
180110Invalid storage source
180111Application required
180112Value outside the accepted set
180113Name required
180200Destination not ready
180201Destination in use
180203Kind not supported by the destination
180204Backup not restorable, with the reason
180205A restore is already in progress for the application
180206Target kind does not match the backup
180207Point in time, or latest, on a kind other than Postgres
180208Separate target unsupported for the VM kinds
180209Destination being deleted
180210Backup being read by a restore
180211Source application gone: name a target
180212Postgres already written to another destination
180213No original disks to keep
180214Recovery time outside the window
180215Log archiving down
180216Run cannot be cancelled
180217Backup locked by its write-once bucket
180218Retention shorter than the bucket's lock
180219No transaction after the recovery time
180220Backup state cannot be verified now
180221The restore would leave the backup's history
180222The VM, or one of its disks, was created again since the backup
180223Restore cannot be cancelled
180224Postgres backup and target of different major versions
180225A disk cannot be restored over itself
180226Postgres still coming up from its last restore
180227Nothing to cancel yet: cancel again in a few seconds

Authentication​

Project api-key (sk_hk_<keyId>_<secret>) for machine clients. Callable operations are those of the public document.

Security Scheme Type:

apiKey

Header parameter name:

X-Hikube-Api-Key

Contact

Hikube - HIDORA: contact@hidora.io

URL: https://hikube.cloud