Making API requests to “https://api.getpostman.com” using the “X-Api-Key” header and asking for a specific collection such as:
curl --location -g --request GET 'https://api.getpostman.com/collections/{{collection_uid}}' \
--header 'X-Api-Key: XXXX'
I notice that in-between requests that the UUID is changing that are referenced by variables:
"variable": [
{
- "id": "1a413276-0b40-4344-a4ee-41d88a8304cc",
+ "id": "8bd5186a-74f6-4f89-b286-2859ccf8e35a",
"key": "authToken",
"value": ""
},
{
- "id": "fb414a84-0c44-4f70-b7ea-b3df8a4b1c0c",
+ "id": "532da9b0-4923-4616-9ca5-019fdae6695b",
"key": "tokenId",
"value": ""
},
{
- "id": "128208f5-fc37-4858-948d-b1a97e1692c5",
+ "id": "e613c352-008a-40a6-8118-a220abf776da",
"key": "userEmail",
"value": ""
},
{
- "id": "e907e5aa-5fe9-4d09-ba5d-c86369eed96f",
+ "id": "1f38a783-7f91-4870-88d0-8f677de32c33",
"key": "userPassword",
"value": ""
}
This is the only thing that changes and it changes every request. I can not find a logical reasoning as to why. I am saving contents of the results from the requests for Collections locally and committing them to git. With the UUID for Variables changing every request this will always yield to a difference and subsequent drift from what is in the repository. My question is is there a way to either stop this behavior or sanitize these differences so they are consistent across API requests (e.g. is there a query parameter I can pass to the API to strip out the id
field for Variables etc.)?