Create an event destination
POST /support/ems/destinations
Creates an event destination.
Required properties
-
name
- String that uniquely identifies the destination. -
type
- Type of destination that is to be created. -
destination
- String that identifies the destination. The contents of this property changes depending on type.
Recommended optional properties
-
filters.name
- List of filter names that should direct to this destination. -
certificate
- When specifying a rest api destination, a client certificate can be provided.
Related ONTAP commands
-
event notification destination create
-
event notification create
Learn more
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
return_records |
boolean |
query |
False |
The default is false. If set to true, the records are returned. |
Request Body
Name | Type | Description |
---|---|---|
_links |
||
certificate |
Certificate information is valid for the "rest_api" type. |
|
destination |
string |
Event destination |
filters |
array[filters] |
|
name |
string |
Destination name. Valid in POST. |
type |
string |
Type of destination. Valid in POST. |
Example request
{
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"certificate": {
"ca": "VeriSign",
"serial_number": 1234567890
},
"destination": "administrator@mycompany.com",
"filters": [
{
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "important-events"
}
],
"name": "Admin_Email",
"type": "email"
}
Response
Status: 201, Created
Name | Type | Description |
---|---|---|
_links |
||
num_records |
integer |
Number of records |
records |
array[records] |
Example response
{
"_links": {
"next": {
"href": "/api/resourcelink"
},
"self": {
"href": "/api/resourcelink"
}
},
"num_records": 3,
"records": [
{
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"certificate": {
"ca": "VeriSign",
"serial_number": 1234567890
},
"destination": "administrator@mycompany.com",
"filters": [
{
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "important-events"
}
],
"name": "Admin_Email",
"type": "email"
}
]
}
Error
Status: Default
ONTAP Error Response Codes
Error Code | Description |
---|---|
983088 |
The destination name provided cannot be empty |
983089 |
The destination name provided cannot contain spaces |
983094 |
The destination name provided is invalid. The destination name must contain between 2 and 64 characters and start and end with an alphanumeric symbol or _(underscore). The allowed special characters are _(underscore) and -(hyphen) |
983104 |
The syslog destination provided is invalid |
983116 |
The number of notifications has reached maximum capacity |
983117 |
The number of destinations has reached maximum capacity |
983129 |
The rest-api destination provided must contain a valid scheme, such as http// or https// |
983130 |
The rest-api destination provided contains an invalid URL |
983131 |
The rest-api destination provided contains an invalid IPv6 URL |
983144 |
The security certificate information provided is incomplete. Provide the certificate and serial number |
983145 |
The rest-api destination provided has an 'http://' scheme. It is invalid to provide certificate information |
983149 |
New SNMP destinations cannot be created |
983151 |
A property provided cannot be configured on the requested destination type |
983152 |
Default destinations cannot be modified or removed |
983153 |
The security certificate provided does not exist |
983154 |
The necessary private key is not installed on the system |
Name | Type | Description |
---|---|---|
error |
Example error
{
"error": {
"arguments": [
{
"code": "string",
"message": "string"
}
],
"code": "4",
"message": "entry doesn't exist",
"target": "uuid"
}
}
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
_links
Name | Type | Description |
---|---|---|
self |
certificate
Certificate information is valid for the "rest_api" type.
Name | Type | Description |
---|---|---|
ca |
string |
Client certificate issuing CA |
serial_number |
string |
Client certificate serial number |
filters
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
ems_destination
Name | Type | Description |
---|---|---|
_links |
||
certificate |
Certificate information is valid for the "rest_api" type. |
|
destination |
string |
Event destination |
filters |
array[filters] |
|
name |
string |
Destination name. Valid in POST. |
type |
string |
Type of destination. Valid in POST. |
_links
Name | Type | Description |
---|---|---|
next |
||
self |
records
Name | Type | Description |
---|---|---|
_links |
||
certificate |
Certificate information is valid for the "rest_api" type. |
|
destination |
string |
Event destination |
filters |
array[filters] |
|
name |
string |
Destination name. Valid in POST. |
type |
string |
Type of destination. Valid in POST. |
error_arguments
Name | Type | Description |
---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
error
Name | Type | Description |
---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |