Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any API for Export Postman Collection v2.1 by APIkey and CollectionID? #751

Open
spamnick opened this issue Aug 16, 2023 · 1 comment

Comments

@spamnick
Copy link

spamnick commented Aug 16, 2023

Idea:
I want to convert automatically Postman collection to Swagger YAML file

I want to run automatically pipeline:

So...

I found this for Export Postman Collection v2.1, but is not automation process:
https://learning.postman.com/docs/getting-started/importing-and-exporting/exporting-data/#exporting-collections

Is there any API for Export Postman Collection v2.1.json by APIkey and CollectionID?

@habibur4340
Copy link

habibur4340 commented Jan 18, 2024

Hey @spamnick ! Yes, you can export a Postman Collection v2.1 using the Postman API by leveraging your API key and the Collection ID. Simply use the Postman API's "GET" request to fetch the collection. Here's a quick guide:

Get Your Postman API Key: First, obtain your Postman API key from the Postman dashboard under your account settings.

Find Your Collection ID: Your Collection ID can be found in Postman under your specific collection details.

Make the API Request: Use the following endpoint to get your collection: GET https://api.getpostman.com/collections/{{collection_uid}}. Replace {{collection_uid}} with your actual Collection ID. Don't forget to include your Postman API key in the header for authentication.

Export the Collection: The response will be the JSON representation of your collection, which you can then save or use as needed.

For a more comprehensive solution, I recommend checking out Apidog. It's a tool designed for managing and synchronizing API documentation, which might offer additional functionalities that could be beneficial for your use case, especially when dealing with API collections and documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants