Change part of URL for all endpoints


Is it possible to change part of URL of any endpoints? How I can do it?

For example I put site URL to var and now I need change it at all endpoints.


This type of activity is covered in the Postman Learning Centre.

If you are new to Postman, then I would suggest a visit to the Learning Centre.

Overview | Postman Learning Center

Including the Postman Training links under “Other Resources”.


I would recommend the “Galaxy APIs 101” course first as it gets you used to the application features.

Then the “Galaxy Testing and Automation” course which teaches you how to assert the responses. It includes using variables.

I think either I phrased my question incorrectly or you misunderstood my question. I will try again.

I have a collection, in the collection there are endpoints. In each endpoint I have a URL like<method>/?<params>. I need to replace with a variable in all endpoints. To avoid having to do this manually, I thought maybe there was a way. I looked at the API and found nothing except:, but there is no way to update collection elements, that’s why I created the ticket here.

Is it clearer now? Or does your answer just solve my problem?


If you want to update the details in a collection, you can use the Postman Collection API which will return a JSON representation of your collection.

Get a collection | Postman Public Workspace | Postman API Network

That API has methods for patch requests.

Update part of a collection | Postman Public Workspace | Postman API Network

The following link may be of use as well.

Structure of a collection | Postman Collection Format


Thanks a lot for your help!


Thanks for your answer, but this is not at all what I need.

In general, my problem is solved as follows:

  1. I get the entire collection using the API -{{collectionId}}.
  2. I replace the necessary part in all endpoints.
  3. I send updated data using the API -{{collectionId}}.

I get profit)


1 Like