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
| Flag | Description |
|---|---|
--api-a | Slug of the API to create (default: derived from the host). |
--host | Keep only this host (default: the most frequent one). |
--secretrepeatable | Store this candidate in local.secrets.env and reference it, e.g. header:authorization. |
--droprepeatable | Leave this candidate out of the import, e.g. cookie:session. |
--secret-all | Store every candidate as a secret. |
--drop-all | Drop every candidate. |
Examples
craftr import har apply ./traffic.harcraftr import har apply ./traffic.har --api petstore-traffic --secret header:authorization --drop cookie:sessioncraftr import har apply ./traffic.har --api petstore-traffic --secret-all