Get All Variables

Description

'Get All Variables' returns 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.

Request URL

http://{controllerMachine}:{controllerPort}/api/v3/variables

Examples

Curl


curl -X GET --header 'Accept: application/json' --header 'AccessKey: Mo87Nc4qDAtzJNDb' 'http://{controllerMachine}:{controllerPort}/api/v3/variables'

PowerShell 

$headers = @{}
$headers.Add("AccessKey","Mo87Nc4qDAtzJNDb")
Invoke-WebRequest -Uri "http://{controllerMachine}:{controllerPort}/api/v3/variables" -ContentType "application/json" -Headers $headers -Method GET

Response Body

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"
        }
    }
]

 

Response fields

Field Type Description Values
$id string ID of internal object  
Name string Name of the variable  
Value LSignal Object holds values for 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 variable  


Response Code

200 (OK)

401 (Unauthorized,incorrect access key)

500 (Internal Server Error)