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
namestringThe name of the agent.
propertiesIDictionary<string, object>Optional properties to set on the agent.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<RestServerAgent>
The created RestServerAgent, or null if creation failed.
Exceptions
- ArgumentException
Thrown when the name is null or empty.