Adds an Event Source to an Alarm DefinitionSends no exclude value. The server keeps the stored Exclude flag of an existing link and stores false for a new link. A consumer that does not know the flag therefore cannot clear it on a re-save. Use the three-argument overload to set or clear the flag. This overload keeps the compiled signature from before the flag existed, so a consumer built against an older package still binds to it. Returns (Task.) Adds an Event Source to an Alarm Definition and sets its Exclude flag Returns (Task.)
Register a new Event Source on the designated Alarm Definition.
| Name | Description |
|---|---|
| alarmDefinition | The alarm definition. |
| eventSource | The event source. |
| alarmDefinition | The alarm definition. |
| eventSource | The event source. |
| exclude | When true, events from this source do not trigger the alarm definition. Stored as Exclude on the link. This overload always sends the value, so false clears a stored true. The two-argument overload sends no value and keeps the stored flag. |
Example in C#
// Returns: nothing
await client.AddEventSourceToAlarmDefinitionAsync(AlarmDefinitionInfo alarmDefinition, BaseInfo eventSource);
Example in C#
// Returns: nothing
await client.AddEventSourceToAlarmDefinitionAsync(AlarmDefinitionInfo alarmDefinition, BaseInfo eventSource, Boolean exclude);
Example in CURL
#In this example we are using a user for the event source
curl -X PUT \
https://api.us.acresecurity.cloud/api/f/INSTANCE.KEY/alarmdefinitions/ALARMDEFINITION.KEY/collections/eventsources \
-H 'Content-Type: application/javascript' \
-d '"/api/f/INSTANCE.KEY/users/USER.KEY"'
Example in CURL
curl -X PUT \
'https://api.us.acresecurity.cloud/api/f/INSTANCE.KEY/alarmdefinitions/ALARMDEFINITION.KEY/collections/eventsources?exclude=true' \
-H 'Authorization: Bearer TOKEN_GOES_HERE' \
-H 'Content-Type: application/json' \
-d '"/api/f/INSTANCE.KEY/users/USER.KEY"'