GUID in Postman

PostmanREST APISOAP API

GUID means Global Unique Identifier. It is in the form of a hexa-decima digit which is separated by hyphen. It helps to achieve distinctiveness due to this even if multiple people are creating the GUID simultaneously, the chance of having a duplicate GUID is rare.

To generate a random value, using GUID, the format is −

{
   "name": "{{$guid}}"
}

On sending a request, it would produce a random value.

GUID is a value with 128 bits having a structure defined in RFC4122. The structure of GUID is uncomplicated and simple for generation.The format of a GUID is shown below −

xxxxxxxx-xxxx-Axxx-Bxxx-xxxxxxxxxxxx

Here, A is the version and B is the variant.

For instance, if a GUID is 6315147b-458e-ada0-7d24b5479582b. Then as per the structure, it has the version 4(which is marked in bold). GUID can be generated manually or with the help of online tools.

The below link will help to generate a GUID −

https://www.guidgenerator.com/

The available versions of GUID are listed below −

  • Version 1 - the MAC address and Date-Time are mentioned.

  • Version 2 - the DCE security is mentioned.

  • Version 3 - the MD5 and namespace are mentioned.

  • Version 4 - produces random digits for creating GUID.

  • Version 5 - the SHA-1 hash and namespace are mentioned.

Benefits

  • GUID can be created manually.

  • Distinct value gets generated every time so there is less chance of encountering identical values.

  • Can be utilized as a database primary key.

  • GUID can be created offline.

  • GUID is useful when we have more than one standalone application.

Drawbacks

  • Consumes a lot of space.

  • No option of sorting to organize data in specific format.

raja
Published on 25-Jun-2021 12:55:25
Advertisements