Raw API access
miosa api sends a request to the MIOSA API with your stored credentials and prints the response body. The path is relative to the API base URL (/api/v1). Use it for anything the CLI has no command for yet.
miosa api [METHOD] <path> [flags] The method defaults to GET, or POST when --data is given.
miosa api /credits/balance
miosa api GET /sandboxes/my-box/ports
miosa api POST /webhooks -d '{"url":"https://example.com/hook","events":["sandbox.ready"]}'
miosa api PATCH /sandboxes/my-box/tags -d @tags.json
echo '{"name":"x"}' | miosa api POST /workspaces -d - | Flag | Meaning |
|---|---|
-X, --method string | HTTP method (default GET, or POST with --data) |
-d, --data string | Request body: JSON, @file, or - for stdin |
-H, --header stringArray | Extra header, 'Name: value' (repeatable) |
-i, --include | Print the status line and response headers first |
A failing status exits non-zero (see exit codes) and still prints the body.
When to reach for the raw API
| Need | Use |
|---|---|
| Code/build/test/runtime workspace | miosa create, miosa exec, miosa files, miosa services, miosa url |
| Full GUI/browser computer | miosa api /computers ... or an SDK (client.computers) |
| App Engine appliance | SDK or API App Engine endpoints; publish from a sandbox to App Engine |
| Product/template readiness | miosa catalog |
| Anything else | miosa api <METHOD> <path> |