- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use dynamic GUID in Postman?
We can use dynamic GUID in Postman. This can be utilized in the request URL, Body or Headers by simply adding the value {{$guid}}. It does not need any declaration or initialization.
Thus {{$guid}} can be used directly in Postman without any requirement of prior processing of the variable. Postman has support for dynamic variables. GUID is one such instance.
We need not allocate memory or value for this variable. The syntax is {{$guid}}. Besides GUID, there are other dynamic variables like randomInt, timestamp, and so on in Postman.
Usage of Dynamic GUID in URL
Url − https://www.tutorialspoint.com/index.htm?n={{$guid}}
The above image shows the usage of {{$guid}} in the URL. On sending the request, we have obtained a successful Response of 200 OK.
Usage of Dynamic GUID in Request URL
Let us execute a POST request on the endpoint − http://dummy.restapiexample.com/api/v1/create. Add a request Body as given below −
{ "customerId": "{{$guid}}" }
Send the POST request. Once the Response is obtained, the Response Body shows the customerID field having a dynamic value generated with GUID.
Usage of Dynamic GUID in Request Headers
The dynamic GUID can also be added in request Headers directly in the format {{$guid}}.