How to best manage APIs and Collections, both synced to git?

In a team workspace, I’ve got an API schema that is synced from a git repository stored in GitLab. That sync process also saves a copy of the Postman collection derived from that API schema.

At some point, that collection has been copied to Collections.

So now I have two copies or versions of the collection, and they seem to be independent of each other.

Here is what I’d like to have happen, but I’m not sure how best to achieve it:

  1. Changes to the API Schema definition are mirrored in the collection that is synced to GitLab. That can mostly be achieved by enabling update suggestions from the definition - I say mostly because there is a manual step afterwards.
  2. I want any scripts preserved. Presumably, updating the collection that is in the APIs section of Postman will cause scripts to be preserved.

So my question really is what do I do about the collection that has been copied to Collections?

Do I delete it or keep it? If I keep it, what is its purpose when there is a collection within APIs? Also, if I keep it, how do I then keep it in sync with the collection in APIs?

I’m basically trying to minimise the friction of keeping this lot up to date within Postman. There are quite a few manual steps already (pull from the repo, update the collection from the definition, publish the definition to Postman) so I’d like to try and avoid having many more :slight_smile:

@pcolmer thanks for raising the request. I am the Product Manager handling this area within Postman. I would be able to answer the question better if I understand what are you trying to achieve with the generated collection. Is it possible to get onto a short call? We have been working on some improvements in this domain that should simplify the workflow a lot more. You can schedule a call with me using this link

1 Like

Delete the duplicate collection in “Collections” and keep the one synced from the “APIs” section. This will be your source of truth. Enable “Update Suggestions” to preserve scripts. Automate the Git sync to minimize manual steps. Keep “Collections” for temporary collections only to reduce maintenance.