You can update information about a specific email address, such as the assigned notification profile.
Execution permission
Admin, Modify
Request line
PUT baseURL/v1/objects/MailAddress/{id}
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 |
|---|---|---|
|
200 |
OK |
Success. |
|
400 |
Bad Request |
The format of the request body is invalid. |
|
401 |
Unauthorized |
No login privilege. |
|
403 |
Forbidden |
No update privilege. |
|
404 |
Not Found |
The resource was not found. |
|
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]
PUT /Analytics/v1/objects/MailAddress/mailAddress%234ac8f61f-d97c-4225-91ce-f4bb10530e24
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
Host: localhost:22015
Accept: application/json
Content-Type: application/json
[Request Body]
{
"instanceID":"mailAddress#4ac8f61f-d97c-4225-91ce-f4bb10530e24",
"email":"admin@example.com",
"isActive":false,
"description":"xxxxx",
"assignedConditionProfilesIDs":[1,2],
"assignedConditionProfiles":["EventProfile-1","EventProfile-2"]
}
[Response Header]
HTTP/1.1 200 OK
Date: Wed, 03 Aug 2016 02:02:34 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#4ac8f61f-d97c-4225-91ce-f4bb10530e24",
"email" : "admin@example.com",
"isActive" : false,
"description" : "xxxxx",
"assignedConditionProfilesIDs" : [ ],
"assignedConditionProfiles" : [ ]
}