Table of Contents

Method CreateRestClientAgentAsync

Namespace
Kepware.Api.ClientHandler
Assembly
Kepware.Api.dll

CreateRestClientAgentAsync(string, IDictionary<string, object>?, CancellationToken)

Creates a new REST Client agent with the specified name.

public Task<RestClientAgent?> CreateRestClientAgentAsync(string name, IDictionary<string, object>? properties = null, CancellationToken cancellationToken = default)

Parameters

name string

The name of the agent.

properties IDictionary<string, object>

Optional properties to set on the agent.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<RestClientAgent>

The created RestClientAgent, or null if creation failed.

Exceptions

ArgumentException

Thrown when the name is null or empty.