List the APIs inside a session, download their OpenAPI spec or send a request
Synopsis
List the HTTP APIs running inside a session: the Kit stream API ("stream") and the Isaac Sim extension API ("omniservice"). With an api name, print its base URL, or with --spec its OpenAPI spec. The stream page in the viewer has an API explorer for them.
With a path, send an authenticated request to the api and print the answer, like 'nova api': the path is relative to the api's base URL (/status goes to <base-url>/status) and the request carries the simulation login ('nova simulation login'), which only goes to the session's host.
Fields: -f key=value string field -F key=value typed field: true, false, null and numbers become JSON literals, @file (or @- for stdin) reads the value from a file Nested keys like gh: pose[position][]=1 or items[][name]=a. Fields make the request a POST unless -X is given; with GET (or together with --input) they go to the query. --input file the request body from a file (- for stdin)
The answer goes to stdout as it arrives; with an HTTP error status the body is still printed and nova exits with 1. Binary answers need --output. WebSocket endpoints are not supported: this sends plain HTTP requests.
nova simulation session api <session> [api [path]] [flags]
Examples
# list the APIs of a session
nova simulation session api my-session
# save the OpenAPI spec of the Isaac Sim extension API
nova simulation session api my-session omniservice --spec -o omniservice.json
# call an API
nova simulation session api my-session omniservice /status
nova simulation session api my-session stream /some/endpoint -X POST -F enabled=true
# print a request without sending it
nova simulation session api my-session omniservice /some/endpoint -f name=x --dry-run
Options
--dry-run Print the request as JSON without sending it
-F, --field key=value Add a typed field key=value (true, false, null, numbers, @file)
-H, --header stringArray Add a request header 'Key: value'
-h, --help help for api
-i, --include Print the status line and response headers before the body
--input string Read the request body from a file (- for stdin)
-X, --method string HTTP method (default: GET, or POST with fields or --input)
-o, --output string File to write the spec (--spec) or the response body to (default: stdout)
-f, --raw-field key=value Add a string field key=value
--silent Don't print the response body
--spec Download the OpenAPI spec of the api
--timeout duration How long to wait for the answer's headers (0: no limit) (default 1m0s)
Options inherited from parent commands
--debug Write diagnostic output to stderr: HTTP requests and responses, external commands, the resolved instance. Known secrets are redacted, but bodies (app environments, kubeconfigs) can still contain some: don't share the output unreviewed (env: NOVA_DEBUG=1)
--env string (Wandelbots internal) Portal environment for this invocation: prod, stg or dev (default: the environment of the cloud instance, else of the last 'nova login'; env: NOVA_ENV)
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity (disables TLS verification for all requests)
--instance string Name of the instance to work against for this invocation (overrides the selected instance; env: NOVA_INSTANCE)
SEE ALSO
- nova simulation session - Manage your streaming sessions