Skip to main content

EnterpriseVariable.GetAllEVariablesAsync

Description

Gets the list of all Enterprise Variables from the connected Control Room

note

Use this API to retrieve all the Enterprise Variables under the Global scope and any of the Enterprise Variables existing under your User scope.

note

You will not be able to retrieve the value of Enterprise Variables encrypted for security reasons.

Signature [C#]

Task<List<EnterpriseVariable>> GetAllEVariablesAsync(string key)

Properties

Input

PropertyDescription
key[for future usage]

Output

PropertyDescription
Task<List<EnterpriseVariable>>Returns a list of all accessible enterprise variables from the connected Control Room.

Remarks

Use GetAllEVariablesAsync API to retrieve all accessible enterprise variables information from the connected Control Room.

Example

C#
public void GetEnterpriseVariables()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");
string key = null;

var availableVars = Task.Run(() => context.EnterpriseVariables.GetAllEVariablesAsync(key)).Result;
foreach (EnterpriseVariable enterpriseVariable in availableVars)
Console.WriteLine("EnterpriseVariable Name: " + enterpriseVariable.Name);
}
C#
public IControlRoomContext LoginControlRoom()
{
IControlRoomContext context;
string connectionString;

connectionString = "ServerUrl=https://demo.onnitellibuddies.com;UserName=demoadmin;Password=password";
context = new ControlRoomContext(connectionString);

context.Open();
return context;
}