Skip to main content

REST endpoints: Notification targets

These endpoints mirror the CLI commands described in N, 0. Each endpoint runs the CLI command named under its heading, so the behavior, defaults, and restrictions are the same; this page lists how to call it over REST.

Conventions that apply to every endpoint (request format, the async and outputType parameters, and the response envelope) are in Requests and responses. In the tables below, Required is Yes when the parameter must always be supplied, No when it is optional, and Depends when it is required only in some combinations (for example, either an application and volume, or a consistency group ID); the CLI chapter for the same command explains the combinations.

POST /notifications/targets/email/add

Add email notification target.

CLI command: notifications targets email add

Body fields (JSON)

Name Type Required Description Email string Yes Email address. MinLevel string No Minimum event level to notify about. All boolean No Notify about all modules. Modules array of string No List of module names to notify about. BatchPostingLimit integer No The maximum number of events to post in a single batch. Must be greater than zero. BatchPostingPeriodInSec integer No The time to wait between checking for event batches (in seconds). Must be greater than zero. Name string No Name in the S1 system (must be unique across all targets). Defaults to the email address.

DELETE /notifications/targets/email/delete

Delete an email notification target.

CLI command: notifications targets email delete

Query parameters

Name Type Required Description name string No Name of the target to delete.

PUT /notifications/targets/email/edit

Edit email notification target.

CLI command: notifications targets email edit

Query parameters

Name Type Required Description name string Yes Name in the S1 system.

Body fields (JSON)

Name Type Required Description Name string Yes Name in the S1 system. Email string No New email address. MinLevel string No Minimum event level to notify about. All boolean No Notify about all modules. Modules array of string No List of module names to notify about. BatchPostingLimit integer No The maximum number of events to post in a single batch. Must be greater than zero. BatchPostingPeriodInSec integer No The time to wait between checking for event batches (in seconds). Must be greater than zero. EnableTarget boolean No Enable the target (only necessary if it was manually disabled). In REST endpoints:one Notificationfield covers a pair of CLI flags: true applies --enableTarget, false applies --disableTarget, and omitting the field applies neither.

GET /notifications/targets/email/list

Display email notification targets.

CLI command: notifications targets email list

Query parameters

Name Type Required Description name string No Filter by target name. email string No Filter by email address.

Response: a list of TargetEmailElement objects in Result.EmailTargets, each with: Name (override string), Email (string), BatchPostingLimit (integer), BatchPostingPeriodInSec (integer).

POST /notifications/targets/seq/add

Add Seq server notification target.

CLI command: notifications targets seq add

Body fields (JSON)

Name Type Required Description ServerUrl string Yes Url address of the Seq server. MinLevel string No Minimum event level to notify about. All boolean No Notify about all modules. Modules array of string No List of module names to notify about. BatchPostingLimit integer No The maximum number of events to post in a single batch. Must be greater than zero. BatchPostingPeriodInSec integer No The time to wait between checking for event batches (in seconds). Must be greater than zero. Name string No Name in the S1 system (must be unique across all targets). Defaults to Seq.

DELETE /notifications/targets/seq/delete

Delete a Seq notification target.

CLI command: notifications targets seq delete

Query parameters

Name Type Required Description name string No Name of the target to delete.

PUT /notifications/targets/seq/edit

Edit Seq server notification target.

CLI command: notifications targets seq edit

Query parameters

Name Type Required Description name string Yes Name in the S1 system.

Body fields (JSON)

Name Type Required Description Name string Yes Name in the S1 system. ServerUrl string No New Url address of the Seq server. MinLevel string No Minimum event level to notify about. All boolean No Notify about all modules. Modules array of string No List of module names to notify about. BatchPostingLimit integer No The maximum number of events to post in a single batch. Must be greater than zero. BatchPostingPeriodInSec integer No The time to wait between checking for event batches (in seconds). Must be greater than zero. EnableTarget boolean No Enable the target (only necessary if it was manually disabled). In REST one field covers a pair of CLI flags: true applies --enableTarget, false applies --disableTarget, and omitting the field applies neither.

GET /notifications/targets/seq/list

Display Seq notification targets.

CLI command: notifications targets seq list

Query parameters

Name Type Required Description name string No Filter by target name. serverUrl string No Filter by Seq server URL.

Response: a list of TargetSeqElement objects in Result.SeqTargets, each with: Name (override string), ServerUrl (string), BatchPostingLimit (integer), BatchPostingPeriodInSec (integer).

POST /notifications/targets/slack/add

Add Slack notification target.

CLI command: notifications targets slack add

Body fields (JSON)

Name Type Required Description WebhookUrl string Yes Slack Webhook Url. MinLevel string No Minimum event level to notify about. All boolean No Notify about all modules. Modules array of string No List of module names to notify about. BatchPostingLimit integer No The maximum number of events to post in a single batch. Must be greater than zero. BatchPostingPeriodInSec integer No The time to wait between checking for event batches (in seconds). Must be greater than zero. Name string No Name in the S1 system (must be unique across all targets). Defaults to Slack.

DELETE /notifications/targets/slack/delete

Delete a Slack notification target.

CLI command: notifications targets slack delete

Query parameters

Name Type Required Description name string No Name of the target to delete.

PUT /notifications/targets/slack/edit

Edit Slack notification target.

CLI command: notifications targets slack edit

Query parameters

Name Type Required Description name string Yes Name in the S1 system.

Body fields (JSON)

Name Type Required Description Name string Yes Name in the S1 system. WebhookUrl string No New Slack Webhook Url. MinLevel string No Minimum event level to notify about. All boolean No Notify about all modules. Modules array of string No List of module names to notify about. BatchPostingLimit integer No The maximum number of events to post in a single batch. Must be greater than zero. BatchPostingPeriodInSec integer No The time to wait between checking for event batches (in seconds). Must be greater than zero. EnableTarget boolean No Enable the target (only necessary if it was manually disabled). In REST one field covers a pair of CLI flags: true applies --enableTarget, false applies --disableTarget, and omitting the field applies neither.

GET /notifications/targets/slack/list

Display Slack notification targets.

CLI command: notifications targets slack list

Query parameters

Name Type Required Description name string No Filter by target name. webhookUrl string No Filter by Slack webhook URL.

Response: a list of TargetSlackElement objects in Result.SlackTargets, each with: Name (override string), WebhookUrl (string), BatchPostingLimit (integer), BatchPostingPeriodInSec (integer).

POST /notifications/targets/snmp/add

Add SNMP notification target.

CLI command: notifications targets snmp add

Body fields (JSON)

Name Type Required Description ManagerAddress string Yes Manager IP address. Name string No Name in the S1 system (must be unique across all targets). Defaults to the manager IP address. ManagerPort integer No Manager port. Default is 162. CommunityString string No The community string to use when sending out a trap. TrapVersion string No SNMP trap version to use: v1/v2/v3. Default is v2. V3Context string No (Only for v3 traps) Context to use when sending out a trap. V3Username string No (Only for v3 traps) Username when using the auth security levels. V3AuthPhrase string No (Only for v3 traps) Pass phrase to use when using the authNoPriv/authPriv security levels. V3PrivacyPhrase string No (Only for v3 traps) Pass phrase to use when using the authPriv security level. MinLevel string No Minimum event level to notify about. All boolean No Notify about all modules. Modules array of string No List of module names to notify about.

DELETE /notifications/targets/snmp/delete

Delete an SNMP notification target.

CLI command: notifications targets snmp delete

Query parameters

Name Type Required Description name string No Name of the target to delete.

PUT /notifications/targets/snmp/edit

Edit SNMP notification target.

CLI command: notifications targets snmp edit

Query parameters

Name Type Required Description name string Yes Name in the S1 system.

Body fields (JSON)

Name Type Required Description Name string Yes Name in the S1 system. ManagerAddress string No New manager IP address. ManagerPort integer No Manager port. MinLevel string No Minimum event level to notify about. All boolean No Notify about all modules. Modules array of string No List of module names to notify about. CommunityString string No The community string to use when sending out a trap. TrapVersion string No SNMP trap version to use: v1/v2/v3. V3Context string No (Only for v3 traps) Context to use when sending out a trap. V3Username string No (Only for v3 traps) Username when using the auth security levels. V3AuthPhrase string No (Only for v3 traps) Pass phrase to use when using the authNoPriv/authPriv security levels. V3PrivacyPhrase string No (Only for v3 traps) Pass phrase to use when using the authPriv security level. EnableTarget boolean No Enable the target (only necessary if it was manually disabled). In REST one field covers a pair of CLI flags: true applies --enableTarget, false applies --disableTarget, and omitting the field applies neither.

GET /notifications/targets/snmp/list

Display SNMP notification targets.

CLI command: notifications targets snmp list

Query parameters

Name Type Required Description name string No Filter by target name. ip string No Filter by manager IP address.

Response: a list of TargetSnmpElement objects in Result.SnmpTargets, each with: Name (override string), ManagerAddress (string), ManagerPort (integer), CommunityString (string), TrapVersion (string), V3Context (string), V3Username (string), V3AuthPhrase (string), V3PrivacyPhrase (string).

POST /notifications/targets/syslog/add

Add Syslog notification target.

CLI command: notifications targets syslog add

Body fields (JSON)

Name Type Required Description Name string No Name in the S1 system (must be unique across all targets). Defaults to the connection type (and server address, if provided). ConnectionType string Yes The Syslog connection to use: remote TCP or remote UDP (local syslog is also available to support/developer users). ServerAddress string Yes Network address of the remote Syslog server. ServerPort integer No Port on the remote Syslog server. SslProtocol string No SSL protocol to use when connecting to the remote Syslog server. MinLevel string No Minimum event level to notify about. All boolean No Notify about all modules. Modules array of string No List of module names to notify about. BatchPostingLimit integer No The maximum number of events to post in a single batch. Must be greater than zero. BatchPostingPeriod integer No The time to wait between checking for event batches (in seconds). Must be greater than zero.

DELETE /notifications/targets/syslog/delete

Delete a Syslog notification target.

CLI command: notifications targets syslog delete

Query parameters

Name Type Required Description name string No Name of the target to delete.

PUT /notifications/targets/syslog/edit

Edit Syslog notification target.

CLI command: notifications targets syslog edit

Query parameters

Name Type Required Description name string Yes Name in the S1 system.

Body fields (JSON)

Name Type Required Description Name string Yes Name in the S1 system. ConnectionType string No The Syslog connection to use: remote TCP or remote UDP (local syslog is also available to support/developer users). ServerAddress string No Network address of a remote Syslog server. ServerPort integer No Port on the remote Syslog server. SslProtocol string No SSL protocol to use when connecting to the remote Syslog server. MinLevel string No Minimum event level to notify about. All boolean No Notify about all modules. Modules array of string No List of module names to notify about. BatchPostingLimit integer No The maximum number of events to post in a single batch. Must be greater than zero. BatchPostingPeriodInSec integer No The time to wait between checking for event batches (in seconds). Must be greater than zero. EnableTarget boolean No Enable the target (only necessary if it was manually disabled). In REST one field covers a pair of CLI flags: true applies --enableTarget, false applies --disableTarget, and omitting the field applies neither.

GET /notifications/targets/syslog/list

Display Syslog notification targets.

CLI command: notifications targets syslog list

Query parameters

Name Type Required Description name string No Filter by target name. serverAddress string No Filter by server address.

Response: a list of TargetSyslogElement objects in Result.SyslogTargets, each with: Name (override string), ServerAddress (string), ServerPort (integer), ConnectionType (string), SslProtocol (string), BatchPostingLimit (integer), BatchPostingPeriodInSec (integer).


See also: Requests and responses - Authentication - Examples