API Collections (CLI)

Manage API collections from the obs CLI. Reusable base URL and default headers shared by API checks, with {{KEY}} references resolved server-side.

Manage API collections: reusable base URL + default-headers groups shared by API checks. A check in a collection inherits its base URL and default headers, so rotating a token or moving hosts is one edit instead of one per check.

obs api-collection create --name "Payments API" --base-url https://api.example.com \
--header "Authorization=Bearer {{TOKEN}}"
obs api-collection list
obs api-collection get <id>
obs api-collection update <id> --base-url https://api-v2.example.com
obs api-collection delete <id> -y

Alias: obs collection.

Create/update flags: -n, --name, --base-url, --header <KEY=VALUE> (repeatable). --base-url may contain {{KEY}} references resolved server-side. An update that omits --header leaves existing headers untouched.

--file <path> create and obs schema api-collection are available, matching the other resource commands.

See also: API Checks for the checks a collection groups, and the CLI reference overview.

Was this page helpful?