Skip to main content

apiome usage

Global options such as --base-url, --tenant and --json go before the command — see CLI reference. Exit codes are listed in Exit codes.

apiome usage​

Feed the runtime usage index: upload recorded traffic (HAR) as usage events.

apiome usage [OPTIONS] COMMAND [ARGS]...

Subcommands: upload.

apiome usage upload​

Upload a HAR file as usage events (POST …/usage/ingest).

Field presence is computed from the bodies on this machine; the bodies, query values and header values are never sent. Exit 0 uploaded, 2 parse error or rejected request (auth included), 1 unreachable.

apiome usage upload [OPTIONS] FILE

Arguments

ArgumentTypeRequiredDescription
FILEpathyesThe HAR file (browser devtools or proxy recording).

Options

OptionTypeDefaultRequiredDescription
--projecttextyesProject slug or UUID the traffic is for.
--environmenttextyesEnvironment the traffic happened in (prod, staging, ...). mock is reserved.
--sourcetextA har usage source id of the project. Default: the project's har source for the environment (created when there is none).
--sample-bodiesflagAlso send redacted body samples. Refused unless the source's body window is open.