You can create a new notification profile by specifying details such as the profile name and notification event level.
Execution permission
Admin, Modify
Request line
POST baseURL/v1/objects/NotificationProfile
Request body
The structure of the request body and the object attributes are as follows:NotificationProfile
{ "instanceID":"...", "profileName":"...", "description":"...", "notificationEventLevels":["...", ...], "useAllCategory":"...", "notificationCategories":["...", ...], "mailRecipientType":"..." }
NotificationProfile (Type: NotificationProfile)
Attribute |
Type |
Description |
---|---|---|
instanceID |
string |
ID of the condition profile for the notification condition |
profileName |
string |
Name of the condition profile for the notification condition |
description |
string |
Description |
notificationEventLevels |
enum[] |
Event level of the events to be reported (For details about the valid values, see the table EventSeverityType in List of enumerators.) |
useAllCategory |
boolean |
Whether or not to use all event categories as notification conditions. To use all event categories as notification conditions, specify "true". To use only specific event categories as notification conditions, specify "false". |
notificationCategories |
enum[] |
Category of the events that can be used in notification conditions. Specify this item only if useAllCategory is "false". (For details about the valid values, see the table EventCategoryType in List of enumerators.) |
mailRecipientType |
enum |
Email transmission type (For details about the valid values, see the table MailRecipientType in List of enumerators.)
|
Response body
The structure of the response body and the object attributes is as follows:NotificationProfile
{ "instanceID":"...", "profileName":"...", "description":"...", "notificationEventLevels":["...", ...], "useAllCategory":"...", "notificationCategories":["...", ...], "mailRecipientType":"..." }
NotificationProfile (Type: NotificationProfile)
Attribute |
Type |
Description |
---|---|---|
instanceID |
string |
ID of the condition profile for the notification condition |
profileName |
string |
Name of the condition profile for the notification condition |
description |
string |
Description |
notificationEventLevels |
enum[] |
Event level of the events to be reported (For details about the valid values, see the table EventSeverityType in List of enumerators.) |
useAllCategory |
boolean |
Whether or not to use all event categories as notification conditions. To use all event categories as notification conditions, specify "true". To use only specific event categories as notification conditions, specify "false". |
notificationCategories |
enum[] |
Category of the events that can be used in notification conditions. Specify this item only if useAllCategory is "false". (For details about the valid values, see the table EventCategoryType in List of enumerators.) |
mailRecipientType |
enum |
Email transmission type (For details about the valid values, see the table MailRecipientType in List of enumerators.)
|
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 name exists. |
412 |
Precondition Failed |
The server is not available. |
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header] POST /Analytics/v1/objects/NotificationProfile Authorization: Basic c3lzdGVtOm1hbmFnZXI= Host: localhost:22015 Accept: application/json Content-Type: application/json [Request Body] { "profileName":"Profile Name@20160812025526397", "description":"description", "notificationEventLevels":["CRITICAL","WARNING"], "useAllCategory":false, "notificationCategories":["PERFORMANCE"], "mailRecipientType":"TO" } [Response Header] HTTP/1.1 201 Created Date: Thu, 11 Aug 2016 17:55:26 GMT Server: Cosminexus HTTP Server Cache-Control: no-cache WWW-Authenticate: HSSO 8113b75377dac59b7c48ee2b947b20d3bbc11f_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" : "notificationProfile#10cf6ab9-b986-4fd2-9cbf-a3e7d0481337", "profileName" : "Profile Name@20160812025526397", "description" : "description", "notificationEventLevels" : [ "CRITICAL", "WARNING" ], "useAllCategory" : false, "notificationCategories" : [ "PERFORMANCE" ], "mailRecipientType" : "TO" }