postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.84k stars 839 forks source link

Collection API not returning expected JSON #11920

Open abrunke opened 1 year ago

abrunke commented 1 year ago

Is there an existing issue for this?

Describe the Issue

When using the https://api.getpostman.com/collections/ endpoint to return a collection the json returned doesn't match the collection.

This is impacting the ability to run Newman & Postman CLI as the folder isn't found and thus 0 iterations execute.

However if I fork the collection and run from the fork the json is as expected.

Running the folder from the collection in the manual runner in the postman app works without issue. So this seems isolated to what's being returned in https://api.getpostman.com/collections/ not being in sync with what's actually in the collection

Steps To Reproduce

  1. call the collection endpoint: https://api.getpostman.com/collections/11955658-f6d4ed04-6dfc-4763-9a54-cb9bb5085376 with an API key (I can share a key if needed)
  2. Inspect the JSON returned
  3. Notice that folders that exist in the postman app or web app are not being returned
  4. Example: "name": "checkoutApi-getPaymentMethods"
  5. Fork the collection from step 1
  6. call that new forked collection ID: https://api.getpostman.com/collections/10822386-a91e4348-03fc-45e8-b19b-b1274ea18314
  7. Inspect the JSON returned
  8. "name": "checkoutApi-getPaymentMethods" is in the JSON

Screenshots or Videos

Desktop App image

JSON from: https://api.getpostman.com/collections/11955658-f6d4ed04-6dfc-4763-9a54-cb9bb5085376 image

JSON from: https://api.getpostman.com/collections/10822386-a91e4348-03fc-45e8-b19b-b1274ea18314 image

Operating System

Window

Postman Version

10.12.13

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response

abrunke commented 1 year ago

It's worth noting that when I export the collection from the Postman Desktop app the JSON is as expected.

When the GitHub integration to back up the collection triggers however the collection it's backing up is NOT as expected

abrunke commented 1 year ago

It also seems that when the collection is duplicated that the JSON returned is as expected. So there's something a miss with 11955658-f6d4ed04-6dfc-4763-9a54-cb9bb5085376 specifically.

Since this is our main collection that all automated tests run from we have various open forks. So switching to a new duplicate is a little more involved.