Make an authenticated HTTP request to the Unikraft Cloud API.
Code
unikraft api <endpoint> [flags]
Examples
List instances in the default metro:
Code
unikraft api /v1/instances
Get the current user's quotas:
Code
unikraft api /v1/users/quotas
Inspect a specific instance by UUID:
Code
unikraft api /v1/instances/abc123-...-def456
Create a new 256MB volume in a specific metro:
Code
unikraft api /v1/volumes --metro=fra -d '{"name":"data","size_mb":256}'
Create resources from a JSON file:
Code
unikraft api /v1/volumes -d @volume.json
Delete an instance by UUID:
Code
unikraft api /v1/instances/abc123-...-def456 -X DELETE
Pipe a request body in from stdin:
Code
unikraft api /v1/volumes -d @-
Check the health of the API:
Code
unikraft api /v1/healthz
Options
Code
-d, --data DATA HTTP request body. Use @path to read from a file, or @- to read from stdin. -H, --header HEADER Add an HTTP header in 'Key: Value' format. May be repeated. -k, --insecure Skip TLS certificate verification. -X, --method method HTTP method to use. Defaults to GET, or POST if --data is set. --metro name Metro to target. Defaults to the profile's default metro.
Options inherited from parent commands
Code
--config file Path to the configuration file. --log-level level Set the logging level. (default info) --log-type type Set the log type. (default text) --profile name Set the current profile. --telemetry Toggle anonymous usage analytics. (default true)