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 Methods:
Method | Request | Response |
---|---|---|
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"
}
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 /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"
}
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"
}
POST /notification/v1/notifications/read
Change the notifications to read status.
Type | Message |
---|---|
Request | |
Response |
GET /notification/v1/notification/{notification_id}
Gets a single Notification.
Type | Message |
---|---|
Request | |
Response |
GET /notification/v1/notificationsPOST /notification/v1/notifications/search
Lists the specified notifications.
Type | Message |
---|---|
Request | |
Response |
POST /notification/v1/notifications/stat
Type | Message |
---|---|
Request | |
Response |
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 |
| ✘ | The type of notification. |
notification_level |
| ✘ | The level of notification. |
domain_id | string | ✔ | The ID of domain. |
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. |
Field | Type | Required | Description |
---|---|---|---|
users | list of string | ✔ | ID list of users to be deleted |
domain_id | string | | |
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 |
| The type of notification. |
notification_level |
| 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. |
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 |
| ✘ | The type of notification. |
notification_level |
| ✘ | 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. |
Field | Type | Required | Description |
---|---|---|---|
notification_id | string | ✔ | The ID of Notification. |
domain_id | string | ✔ | The ID of domain. |
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. |
Field | Type | Description |
---|---|---|
results | List of queried notifications. | |
total_count | Total counts of queried notifications. |
Field | Type | Required | Description |
---|---|---|---|
protocol_id | string | ✔ | The ID of Protocol. |
data | ✔ | | |
message | ✔ | | |
notification_type | string | ✘ | |
notification_level | string | ✘ | |
domain_id | string | ✔ | |
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. |
Last modified 1yr ago