SpaceONE APIs
Latest Version
Search
K

Notification

Notification is a service that delivers event information generated in SpaceONE to a project or user. Protocol is the definition of “in what way” when Notification is delivered through Channel. The cr
Package : spaceone.api.notification.v1

Notification

Notification Methods:

create

POST /notification/v1/notifications
Create a new Notification. When a notification is created, it is propagatedthrough the channel of the project to which the notification belongs, and if an internal channel oruser channel is set, the notification is also propagated to the user.
Type
Message
Request
Response
Request Example
Response Example
{
"resource_type": "identity.Project",
"resource_id": "resource-123456789012",
"topic": "monitoring.Alert",
"message": {
"title": "[Alerting] Not Running Pods 0:OK alert",
"description": "[spaceone-dev] Not Running Pods 0 is OK\n\nFailure level : WorkerNode\nPanel ... ",
"tags": {
"urgency": "LOW",
"resource_id": "pod",
"assignee": "[email protected]",
"created_at": "2022-01-01T17:12:45.990Z",
"state": "ACKNOWLEDGED",
"project_id": "project-123456789012"
}
},
"notification_type": "INFO",
"notification_level": "LV2",
"domain_id": "domain-123456789012"
}
{
"notification_id": "notification-123456789012",
"topic": "monitoring.Alert",
"message": {
"title": "[Alerting] Not Running Pods 0:OK alert",
"description": "[spaceone-dev] Not Running Pods 0 is OK\n\nFailure level : WorkerNode\nPanel ... ",
"tags": {
"urgency": "LOW",
"resource_id": "pod",
"assignee": "[email protected]",
"created_at": "2022-01-01T17:12:45.990Z",
"state": "ACKNOWLEDGED",
"project_id": "project-123456789012"
}
},
"notification_type": "INFO",
"notification_level": "LV2",
"is_read": true,
"user_id": "[email protected]",
"domain_id": "domain-123456789012",
"created_at": "2022-01-01T17:12:40.990Z"
}

push

POST /notification/v1/notifications/push
Push a new Notification directly.When a notification is created, it is propagated through the channel of the project to which the notification belongs, and if an internal channel or user channel is set, the notification is also propagated to the user.
Type
Message
Request
Response
Request Example
Response Example
{
"domain_id": "xxxx-aws-abcd",
"tags": {
"env": "dev"
}
}
{
"domain_id": "xxxx-aws-abcd"
}

delete

DELETE /notification/v1/notification/{notification_id}
Delete the Notification.
Type
Message
Request
Response
Request Example
Response Example
{
"domain_id": "xxxx-aws-abcd",
"tags": {
"env": "dev"
}
}
{
"domain_id": "xxxx-aws-abcd"
}

delete_all

POST /notification/v1/notification/delete_all
Delete all Notifications. When a notification is created, it is propagated through the channel of the project to which the notification belongs, and if an internal channel or user channel is set, the notification is also propagated to the user.
Type
Message
Request
Response
Request Example
Response Example
{
"domain_id": "xxxx-aws-abcd",
"tags": {
"env": "dev"
}
}
{
"domain_id": "xxxx-aws-abcd"
}

set_read

POST /notification/v1/notifications/read
Change the notifications to read status.
Type
Message
Request
Response

get

GET /notification/v1/notification/{notification_id}
Gets a single Notification.
Type
Message
Request
Response

list

GET /notification/v1/notifications
POST /notification/v1/notifications/search
Lists the specified notifications.
Type
Message
Request
Response

stat

POST /notification/v1/notifications/stat
Type
Message
Request
Response

Message

CreateNotificationRequest

Field
Type
Required
Description
resource_type
string
The type of resource to which the notification is dispatched.Currently, only "identity.Project" or "identity.User" can be set.
resource_id
string
The ID of the resource to which notifications are dispatched.If resource_type is "identity.Project", then resource_id requires a project ID values.If resource_type is "identity.User", then resource_id requires a user ID value.
topic
string
The topic of notification.
message
This message is used for each protocol.
notification_type
  • NOTIFICATION_TYPE_NONE
  • INFO
  • ERROR
  • SUCCESS
  • WARNING
The type of notification.
notification_level
  • NONE
  • ALL
  • LV1
  • LV2
  • LV3
  • LV4
  • LV5
The level of notification.
domain_id
string
The ID of domain.

GetNotificationRequest

Field
Type
Required
Description
notification_id
string
The ID of Notification.
domain_id
string
The ID of domain.
only
list of string
The list of the notification information column you want to be returned. It must be specified in the NotificationInfo.

NotificationDeleteAllRequest

Field
Type
Required
Description
users
list of string
ID list of users to be deleted
domain_id
string

NotificationInfo

Field
Type
Description
notification_id
string
The ID of notification.
topic
string
The topic of notification.
message
The contents of notification.This message is used for each protocol.
notification_type
  • NOTIFICATION_TYPE_NONE
  • INFO
  • ERROR
  • SUCCESS
  • WARNING
The type of notification.
notification_level
  • NONE
  • ALL
  • LV1
  • LV2
  • LV3
  • LV4
  • LV5
The level of notification.
is_read
bool
Whether or not to check the notification.If notification has been returned at least once through the Get or List method, is_read is changed to True.
user_id
string
The ID of user to whom the notification was dispatched.
domain_id
string
The ID of domain
created_at
string
Notification creation time.

NotificationQuery

Field
Type
Required
Description
query
Query format provided by SpaceONE. Please check the link for more information.
notification_id
string
The ID of notification.
topic
string
The topic of notification.
notification_type
  • NOTIFICATION_TYPE_NONE
  • INFO
  • ERROR
  • SUCCESS
  • WARNING
The type of notification.
notification_level
  • NONE
  • ALL
  • LV1
  • LV2
  • LV3
  • LV4
  • LV5
The level of notification.
is_read
bool
Whether or not to check the notification.If is_read is False, the user has not checked the notification yet.
parent_notification_id
string
The ID of parent notification. Not used yet.
project_id
string
The project ID to which the notification will be dispatched.
user_id
string
The ID of user.
domain_id
string
The ID of domain.

NotificationRequest

Field
Type
Required
Description
notification_id
string
The ID of Notification.
domain_id
string
The ID of domain.

NotificationStatQuery

Field
Type
Required
Description
query
Statistics Query format provided by SpaceONE. Please check the link for more information.
domain_id
string
The ID of domain.

NotificationsInfo

Field
Type
Description
results
List of queried notifications.
total_count
int32
Total counts of queried notifications.

PushNotificationRequest

Field
Type
Required
Description
protocol_id
string
The ID of Protocol.
data
message
notification_type
string
notification_level
string
domain_id
string

SetReadNotificationRequest

Field
Type
Required
Description
notifications
list of string
The ID list of notification that want to change read status.
domain_id
string
The ID of domain.