craftr import har apply

Create a new API from a HAR file. Every secret candidate needs a decision: from the flags, or prompted in a terminal. Fails if the API already exists.

Usage

craftr import har apply <file.har> [--api <slug>] [--host <host>] [--secret <in:name>…] [--drop <in:name>…] [--secret-all] [--drop-all]

Flags

FlagDescription
--api-aSlug of the API to create (default: derived from the host).
--hostKeep only this host (default: the most frequent one).
--secretrepeatableStore this candidate in local.secrets.env and reference it, e.g. header:authorization.
--droprepeatableLeave this candidate out of the import, e.g. cookie:session.
--secret-allStore every candidate as a secret.
--drop-allDrop every candidate.

Examples

craftr import har apply ./traffic.har
craftr import har apply ./traffic.har --api petstore-traffic --secret header:authorization --drop cookie:session
craftr import har apply ./traffic.har --api petstore-traffic --secret-all