craftr import postman apply
Create a new API from a Postman collection. Every secret candidate needs a decision: from the flags, or prompted in a terminal. Scripts are written commented out under a throw, so they fail until rewritten. Fails if the API already exists.
Usage
craftr import postman apply <collection.json> [--api <slug>] [--environment <environment.json>…] [--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 collection name). |
--environment-erepeatable | Exported Postman environment to import as an environment of the new API. |
--secretrepeatable | Store this candidate in the git-ignored .secrets.env files and reference it, e.g. variable:access_token. |
--droprepeatable | Drop the value of this candidate (a variable stays declared, a header is left out), e.g. auth:apikey. |
--secret-all | Store every candidate as a secret. |
--drop-all | Drop every candidate. |
Examples
craftr import postman apply ./timers.postman_collection.json --environment ./staging.postman_environment.jsoncraftr import postman apply ./timers.postman_collection.json --secret variable:access_token --drop auth:apikeycraftr import postman apply ./timers.postman_collection.json --api timers --secret-all