Knowledge base
Tips and tricks Best practice guides, FAQ & more
Find tutorials, guides and use case examples in the
Learning centerGet All Variables
'Get All Variables' returns a list of all permanent variables. These variables are static across the Leapwork Controller and should not be confused with the variables used to trigger a Schedule.
http://{controllerMachine}:{controllerPort}/api/v4/variables
curl -X GET --header 'Accept: application/json' --header 'AccessKey: Mo87Nc4qDAtzJNDb' 'http://{controllerMachine}:{controllerPort}/api/v4/variables'
$headers = @{}
$headers.Add("AccessKey","Mo87Nc4qDAtzJNDb")
Invoke-WebRequest -Uri "http://{controllerMachine}:{controllerPort}/api/v4/variables" -ContentType "application/json" -Headers $headers -Method GET
List of Variables:
[ { "$id": "1", "Name": "Var2", "Value": { "$id": "2", "$type": "Leapwork.Models.Models.LDataTypes.LText, Leapwork.Models", "Value": "500" } }, { "$id": "3", "Name": "Var1", "Value": { "$id": "4", "$type": "Leapwork.Models.Models.LDataTypes.LText, Leapwork.Models", "Value": "100" } } ] |
Field | Type | Description | Values |
---|---|---|---|
$id | string | ID of internal object | |
Name | string | Name of the variable | |
Value | LSignal | Object holds values for the variable | "$id", "$type", "Value" |
LSignal | Object | ||
$id | string | ID of internal object | |
Type | Leapwork.Models.Models.LDataTypes.Ltext | Static data type | |
Value | string | Value of in the variable |
Response Code
200 (OK)
401 (Unauthorized,incorrect access key)
500 (Internal Server Error)
©2024, Leapwork. All rights reserved.