- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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}}.
- Related Articles
- GUID in Postman
- Manually Generating GUID in Postman
- How to use Sessions in Postman?
- How to Use Environment Variables in Postman?
- How to use Global Variable in Postman Request?
- How to create Guid value in C#?
- How to Use WebDriver Javascript Executor to Navigate to a URL using Postman?
- How to Import Collection in Postman?
- How to Monitor Collections in Postman?
- How to Manage Cookies in Postman?
- How to Add Cookies in Postman?
- How to create sessions in Postman?
- How to parameterize requests in Postman?
- How to Generate API Documentation in Postman?
- How to run Collection Runner in Postman?
