Skip to content

Using PM API key for collection and env #85

Answered by thim81
w100frt asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @w100frt

The postman-to-k6 CLI expects the files to be on your local file system to be able to process them.
We deliberate did not included operations to download the Postman collection to keep the scope of the CLI focussed on the conversion.

You could use a very simple shell script to download the Postman collection and Postman Environment as files upfront, which next can be be passed along.

#!/bin/bash

# Postman API references
API_KEY=<YOUR-POSTMAN-API-KEY>
COLLECTION_UUID=<YOUR-POSTMAN-COLLECTION-UUID>
ENVIRONMENT_UUID=<YOUR-POSTMAN-ENVIRONMENT-UUID>

# Download Postman Collection
curl --header "X-Api-Key: $API_KEY" -s "https://api.getpostman.com/collections/$COLLECTION_UUID" -o po…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by w100frt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants