EnterpriseVariable.GetAllEVariablesAsync
Description
Gets the list of all Enterprise Variables from the connected AI Command Center
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
| Property | Description |
|---|---|
| key | [for future usage] |
Output
| Property | Description |
|---|---|
| Task<List<EnterpriseVariable>> | Returns a list of all accessible enterprise variables from the connected AI Command Center. |
Remarks
Use GetAllEVariablesAsync API to retrieve all accessible enterprise variables information from the connected AI Command Center.
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;
}