How to use Global Variable directly in Object Repository URL

If you are using KS < 6.1.0 this can be a problem (more info: Can't use variables in Web Service Request URL).
My approach in 5.10.1:

  1. Set Global variables in profile: “G_URLProtocol”, “G_URLHost” and “G_URLPort”
  2. In Object Repository → API request → Variables set local variables from global.
  3. Build URL in “Endpoint” variable (screen). If you do not need protocol from variable or you are using KS => 6.1.0 you do not have to create this, just use local variables in rest URL.

image

1 Like