Logo
15_Days_of_Postman_-_for_testers_IvanKo API Documentation

Update global variables

PUT {{baseUrl}}/workspaces/{{workspaceId}}/global-variables

Updates and replaces a workspace's global [variables] This endpoint replaces all existing global variables with the variables you pass in the request body:

  • key — A string value that contains the variable's name.

  • type — A string value that contains the [type] of variable. Accepts default or secret.

  • value — A string value that contains the variable's value.

  • enabled — A boolean value that, if true, enables the variable.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Content-Type
string




RESPONSES

status OK

{ "values": [ { "value": "PMAK-XXXX", "key": "api-key", "enabled": true, "type": "secret" }, { "value": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2", "key": "collection_uid", "enabled": true, "type": "default" } ] }



Curl
curl -X PUT 'https://api.getpostman.com/workspaces/workspaceId/global-variables' -H 'Content-Type: application/json'

ENDPOINTS