fun api

Dynamically-generated commands from the platform’s OpenAPI specs

Synopsis

Exposes every endpoint of the Fundamentum public APIs as CLI commands, generated at runtime from their OpenAPI documents (/v1 swagger.json and /v2 openapi.json).

WARNING: this command tree is NOT a stable interface. Group and operation names are taken from the API specs themselves (their tags and operation ids), so they change whenever the platform republishes its OpenAPI documents — for example when endpoints are regrouped or an operation is renamed. Use “fun api” to explore the platform and for one-off calls. For automation that must keep working across releases, prefer the curated commands (fun functions, fun devices, …), whose names are versioned with the CLI.

Run “fun api refresh” once to download and cache the specs for the active context. Commands are then available grouped by version and tag, e.g.:

fun api v2 functions list-function –project-id 1 fun api v1 device get-device –project-id 1 –device-id 42

Request bodies are provided with –body (inline JSON) or –body-file (a path, or “-” for stdin).

Informational output (the active context and HTTP status) is written to stderr, so stdout stays clean JSON when redirected or piped. Use –data-only to print just the response “data” field, e.g.:

fun api v2 licenses list-licenses –project-id 1 –data-only > licenses.json

Parameters are exposed as kebab-case flags (e.g. a “project_id” spec parameter becomes –project-id), regardless of how the spec names them.

Paginated GET operations open an interactive pager when run in a terminal; pass an explicit –page to fetch a single page instead (or –data-only to print the raw data without the pager).

Options

  -h, --help   help for api

Options inherited from parent commands

      --config string   config directory

SEE ALSO