You can create information about a new email address by specifying information such as the email address and notification profile to be assigned.
Execution permission
Admin, Modify
Request line
POST baseURL/v1/objects/MailAddress
Request body
The structure of the request body and the object attributes are as follows:MailAddress
{ "instanceID":"...", "email":"...", "isActive":"...", "description":"...", "assignedConditionProfilesIDs":["...", ...], "assignedConditionProfiles":["...", ...] }
MailAddress (Type: MailAddress)
Attribute |
Type |
Description |
---|---|---|
instanceID |
string |
ID of the mail address |
|
string |
Mail address |
isActive |
boolean |
Whether or not the email addresses are enabled as notification destinations. For enabled addresses, "true" is set. For disabled addresses, "false" is set. |
description |
string |
Description |
assignedConditionProfilesIDs |
string[] |
ID of the condition profile for the notification condition in which this email address is specified as the destination address |
assignedConditionProfiles |
string[] |
Name of the condition profile for the notification condition in which this email address is specified as the destination address |
Response body
The structure of the response body and the object attributes is as follows:MailAddress
{ "instanceID":"...", "email":"...", "isActive":"...", "description":"...", "assignedConditionProfilesIDs":["...", ...], "assignedConditionProfiles":["...", ...] }
MailAddress (Type: MailAddress)
Attribute |
Type |
Description |
---|---|---|
instanceID |
string |
ID of the mail address |
|
string |
Mail address |
isActive |
boolean |
Whether or not the email addresses are enabled as notification destinations. For enabled addresses, "true" is set. For disabled addresses, "false" is set. |
description |
string |
Description |
assignedConditionProfilesIDs |
string[] |
ID of the condition profile for the notification condition in which this email address is specified as the destination address |
assignedConditionProfiles |
string[] |
Name of the condition profile for the notification condition in which this email address is specified as the destination address |
Status codes
Status code |
Reason phrase |
Description |
---|---|---|
201 |
Created |
Success. |
400 |
Bad Request |
The format of the request body is invalid. |
401 |
Unauthorized |
No login privilege. |
403 |
Forbidden |
No create privilege. |
409 |
Conflict |
A resource with the same email exists. |
412 |
Precondition Failed |
The server is not available. |
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header] POST /Analytics/v1/objects/MailAddress Authorization: Basic c3lzdGVtOm1hbmFnZXI= Host: localhost:22015 Accept: application/json Content-Type: application/json [Request Body] { "email":"admin@example.com", "isActive":true, "description":"description", "assignedConditionProfilesIDs":[1,2], "assignedConditionProfiles":["EventProfile-1","EventProfile-2"] } [Response Header] HTTP/1.1 201 Created Date: Wed, 03 Aug 2016 02:02:33 GMT Server: Cosminexus HTTP Server Cache-Control: no-cache WWW-Authenticate: HSSO a61560c2eac97b0564aec48d2883daf39c0dfdf_YXZvNFIMehp3UB4jbmVyPGUgT3Q=_V0810 X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Transfer-Encoding: chunked Content-Type: application/json [Response Body] { "instanceID" : "mailAddress#b2dd1785-bc8a-4cb2-90d2-cd6a41aab82c", "email" : "admin@example.com", "isActive" : true, "description" : "description", "assignedConditionProfilesIDs" : [ ], "assignedConditionProfiles" : [ ] }