Introducing postmanctl, a CLI for interacting with the Postman API

Hi there,

Do you need to automate management of Postman API resources, such as collections, environments, mocks, monitors, and APIs? Me, too!

In the past, we’ve had a couple of options:

  1. Orchestrate HTTP requests to the Postman API via curl and shell scripts
  2. Craft workflows in Postman collections that can be executed via newman

Both options are powerful ways to interact with the Postman API, and yet they also may not be the right fit for certain use cases.

To fit these other use cases, I’d like to introduce postmanctl, a CLI for interacting directly with the Postman API.

The postmanctl tool supports just about everything that’s available today via the Postman API.

Some use cases worth considering, that could be made easier with postmanctl:

  1. Get quick access to Postman collection data without switching contexts while working on the command line. (See: postmanctl describe collection --help.)
  2. Automatically fork a collection to stage in-progress changes introduced by source control. (See: postmanctl fork collection --help.)
  3. Pull API schemas managed in Postman’s API Builder to validate against internal standards and guidelines. (See: postmanctl get schema --help along with output options json, jsonpath.)
  4. Iterate over environment variables to execute security and compliance checks. (See: postmanctl get env [environment-id] -o json.)

I’d love to hear what use cases you may have, as well! Feel free to post here or reach out. Issues can be managed on the GitHub repo, though I’m happy to also answer questions here.

See the installation instructions (binary, homebrew, build from source) in the README documentation. Binaries are available for Windows, macOS, and Linux.

Feel free to reach out if you’d like to explore a deeper demo to examine how postmanctl can help solve your use cases!

Best,

Kevin

13 Likes

Hi,

I trying to use postmanctl describe apis but can’t figure out what the missing argument is.

postmanctl describe apis --help
Usage:
  postmanctl describe apis [flags]

Aliases:
  apis, api

Flags:
  -h, --help   help for apis

Global Flags:
      --config string    config file (default is $HOME/.postmanctl.yaml)
      --context string   context to use, overrides the current context in the config file

Thanks,
Hubert

@HubertWagner

The describe command works on individual API entities. You can copy this directly from the Postman app or you can do a postmanctl get apis to list all of them and choose the ID.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.