Octov0.11.17
Referenceoctopaas CLI

octopaas api

Call any API route with your credential

Call any route of the public API, signed in as you, and print what it answers. It is the way to reach something octopaas has no command for yet; the routes are described at /openapi.yaml.

The method is GET, or POST when you send data. --data takes a string, @file, or @- for stdin. A JSON answer is pretty-printed; anything else is printed as it came. A failure status still prints the answer, then exits 1.

octopaas api <path> [flags]

Examples

octopaas api /v1/me
octopaas api /v1/deployments | jq '.[].status'
octopaas api -X PATCH /v1/deployments/$ID -d '{"replicas": 2}'
octopaas api /openapi.yaml > openapi.yaml

Flags

FlagWhat it doesDefault
--content-typethe body's Content-Typeapplication/json
-X, --methodthe HTTP method (default GET, or POST with --data)
-d, --datathe request body: a string, @file, or @- for stdin
-i, --includeprint the status line and headers too