Table of Contents

Method CreateRestServerAgentAsync

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

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

Creates a new REST Server agent with the specified name.

public Task<RestServerAgent?> CreateRestServerAgentAsync(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<RestServerAgent>

The created RestServerAgent, or null if creation failed.

Exceptions

ArgumentException

Thrown when the name is null or empty.