openapi-to-postman
openapi-to-postman copied to clipboard
Is there any API for Export Postman Collection v2.1 by APIkey and CollectionID?
Idea: I want to convert automatically Postman collection to Swagger YAML file
I want to run automatically pipeline:
- Generate Postman Collection v2.1
- Convert Postman Collection v2.1/v2.0 to OpenAPI v3.0. YAML file ( by using this: https://github.com/joolfe/postman-to-openapi)
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?
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.