Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Events to CONNECT

Configuration tools

  • Last UpdatedOct 07, 2024
  • 1 minute read

You can configure the agent with the Post-install Configurator plugin, or using a commonly-used REST tool like curl, PowerShell, or C#.

curl

curl is a command line tool used to make HTTP calls and is supported on Windows operating systems. You can script curl with PowerShell on Windows and you can use it to perform agent administrative and programming tasks. curl commands are used in configuration and management examples throughout this document. For more information, see curl (https://curl.haxx.se/).

Important: Run curl commands in PowerShell or command prompt with Administrator privileges and use --ntlm --negotiate -u <UserName> options to use windows integrated security.

Example:

curl.exe --ntlm --negotiate -u <UserName> -X GET "http://localhost:5590/api/v1/configuration/RESTAPIEventData1/DataSource"

C#

The following sample shows code to use windows integrated security.

Example:

class Program

{

static async Task Main(string[] args)

{

// Create an instance of HttpClient

using (HttpClient client = new HttpClient(new HttpClientHandler { UseDefaultCredentials = true

}))

{

try

{

// Make a GET request to the API endpoint

HttpResponseMessage response = await client.GetAsync("http://localhost:5590/api/v1/configuration/RESTAPIEventData1/DataSource");

// Check if the request was successful

if (response.IsSuccessStatusCode)

{

// Read the response content

string responseBody = await response.Content.ReadAsStringAsync();

Console.WriteLine(responseBody);

}

else

{

Console.WriteLine($"Request failed with status code: {response.StatusCode}");

}

}

catch (Exception ex)

{

Console.WriteLine($"An error occurred: {ex.Message}");

}

}

}

}

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in