In this “GUID in Postman” article, I will be demonstrating how you can implement this concept and get a tight grip over this.
What is GUID?
GUID stands for Global Unique Identifier. It is basically hexadecimal digits separated by hyphens. GUID solves the purpose of uniqueness.
In Postman, we use this to generate and send a random value to APIs.
It can be generated using online tools or manually. Online tool to generate guid is https://www.guidgenerator.com/
GUID is a 128-bit value. It follows the structure defined in RFC4122.
Basic structure is: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx where M defines version and N defines variant
For Example, b3d27f9b-d21d-427c-164e-7fb6776f87b0 guid is a version 4
There are various versions defined for guid:
Version1: Date-Time and MAC address are used
Version2: Uses DCE security
Version3: MD5 hash and namespace are used
Version4: Generate random digits to create a GUID
Version5: SHA-1 hash and namespace are used
- Unique value is generated every time. Hence, less or no probability of duplicate values.
- GUIDs can be generated manually.
- GUID can be used as a primary key in database
- GUIDs are used when we have multiple independent systems
- Takes a lot of space
- Sorting can’t be performed to arrange data in particular data
Learn “API Documentation” in the next tutorial.