UserChannel

UserChannel #

A UserChannel is a destination where Notifications are delivered. Notifications are generated via the Protocol set by each User.

Package : spaceone.api.notification.v1



UserChannel #

UserChannel Methods:

MethodRequestResponse
createCreateUserChannelRequestUserChannelInfo
updateUpdateUserChannelRequestUserChannelInfo
set_scheduleUpdateUserChannelScheduleRequestUserChannelInfo
set_subscriptionUpdateUserChannelSubscriptionRequestUserChannelInfo
enableUserChannelRequestUserChannelInfo
disableUserChannelRequestUserChannelInfo
deleteUserChannelRequestEmpty
getUserChannelRequestUserChannelInfo
listUserChannelQueryUserChannelsInfo
statUserChannelStatQueryStruct

create #

Creates a new UserChannel. A UserChannel is a channel that delivers a Notification to users when the Notification is created. When creating a UserChannel, one Protocol must be selected, and an Notification is dispatched via the selected Protocol.

POST /notification/v1/user-channel/create

CreateUserChannelRequest

  • protocol_id (string) Required

    The ID of protocol that will be set in user channel.

  • name (string) Required

    The name of User Channel. It can have a maximum of 255 characters.

  • data (Struct) Required

    The data for using user channel. This data is encrypted and stored in the Secret service if JSON schema in the protocol’s metadata is set to SECRET type. In this case, the secret ID that is stored in the security service will be returned and the data value will be empty. if JSON schema in the protocol’s metadata is set to PLAIN_TEXT type, This data is not encrypted and stored directly in the DB.

  • is_subscribe (bool)

    Indicates whether subscriptions will be used.

  • subscriptions (string) Repeated

    When using subscriptions, it indicates the topic list to subscription. If is_subscribe is set to false, this value is ignored.

  • is_scheduled (bool)

    Indicates whether schedule will be used.

  • schedule (UserChannelSchedule)

    Schedule for which you want to receive notifications through the user channel.

  • tags (Struct)

    The tags for user channel.

{
   "protocol_id": "protocol-123456789012",
   "name": "Email",
   "data": {
       "email": "user1@email.com"
   },
}

UserChannelInfo

  • user_channel_id (string) Required

    The ID of user channel.

  • name (string) Required

    The name of user channel

  • state (UserChannelState) Required

    The state of user channel. ENABLED or DISABLED only.

  • data (Struct) Required

    The data for using user channel.

  • is_subscribe (bool) Required

    Indicates whether subscriptions will be used.

  • subscriptions (string) Repeated Required

    The topic list to subscription.

  • is_scheduled (bool) Required

    Indicates whether schedule will be used.

  • schedule (UserChannelSchedule) Required

    Schedule for which you want to receive notifications through the user channel.

  • tags (Struct) Required

    The tags for user channel.

  • domain_id (string) Required

    The ID of domain.

  • user_id (string) Required

    The ID of user using the user channel.

  • protocol_id (string) Required

    The ID of protocol set in the user channel.

  • user_secret_id (string) Required

    The ID of secret encrypted data in the security service

  • created_at (string) Required

    User channel creation time.

{
   "user_channel_id": "user-ch-123456789012",
   "name": "Email",
   "state": "ENABLED",
   "data": {
       "email": "user1@email.com"
   },
   "protocol_id": "protocol-123456789012",
   "user_id": "user1@email.com",
   "domain_id": "domain-123456789012",
   "created_at": "2022-01-01T08:28:49.108Z"
}

update #

Updates a specific UserChannel. A UserChannel that has already been configured cannot be changed. Instead, the data required for dispatching Notifications to a UserChannel can be updated.

POST /notification/v1/user-channel/update

UpdateUserChannelRequest

  • user_channel_id (string) Required

    The ID of user channel.

  • name (string)

    The name of user channel. It can have a maximum of 255 characters.

  • data (Struct)

    The data for using user channel. This data is encrypted and stored in the Secret service if JSON schema in the protocol’s metadata is set to SECRET type. In this case, the secret ID that is stored in the security service will be returned and the data value will be empty. if JSON schema in the protocol’s metadata is set to PLAIN_TEXT type, This data is not encrypted and stored directly in the DB.

  • schedule (UserChannelSchedule)

    Set the level of notification. If a notification has a level and a notification level that this channel can receive is set, a notification is dispatched only if the notification level is the same.

  • tags (Struct)

    The tags for user channel.

{
   "user_channel_id": "user-ch-123456789012",
   "name": "Email2",
   "data": {
       "email": "user1@gmail.com"
   },
   "tags": {
       "type": "test"
   }
}

UserChannelInfo

  • user_channel_id (string) Required

    The ID of user channel.

  • name (string) Required

    The name of user channel

  • state (UserChannelState) Required

    The state of user channel. ENABLED or DISABLED only.

  • data (Struct) Required

    The data for using user channel.

  • is_subscribe (bool) Required

    Indicates whether subscriptions will be used.

  • subscriptions (string) Repeated Required

    The topic list to subscription.

  • is_scheduled (bool) Required

    Indicates whether schedule will be used.

  • schedule (UserChannelSchedule) Required

    Schedule for which you want to receive notifications through the user channel.

  • tags (Struct) Required

    The tags for user channel.

  • domain_id (string) Required

    The ID of domain.

  • user_id (string) Required

    The ID of user using the user channel.

  • protocol_id (string) Required

    The ID of protocol set in the user channel.

  • user_secret_id (string) Required

    The ID of secret encrypted data in the security service

  • created_at (string) Required

    User channel creation time.

{
   "user_channel_id": "user-ch-123456789012",
   "name": "Email",
   "state": "ENABLED",
   "data": {
       "email": "user1@email.com"
   },
   "protocol_id": "protocol-123456789012",
   "user_id": "user1@email.com",
   "domain_id": "domain-123456789012",
   "created_at": "2022-01-01T08:28:49.108Z"
}

set_schedule #

Sets a schedule for a UserChannel. A schedule defines the time to receive a Notification. When a Notification is created, you can set the day of the week and time you want to receive it. When you set the day of the week, you can receive a notification only on the day of the week you set. If you also set the start time and end time with the day of the week, you can receive a Notification only at the scheduled time on the day of the week you set. If there is no schedule set in a UserChannel, Notifications will be dispatched at all times via the UserChannel.

POST /notification/v1/user-channel/set-schedule

UpdateUserChannelScheduleRequest

  • user_channel_id (string) Required

    The ID of user channel.

  • is_scheduled (bool) Required

    Indicates whether schedule will be used.

  • schedule (UserChannelSchedule)

    Schedule for which you want to receive notifications through the user channel.

{
   "user_channel_id": "user-ch-28097e8d5d59",
   "is_scheduled": true,
   "schedule": {
       "day_of_week": [
           "MON",
           "TUE",
           "WED",
           "THU",
           "FRI"
       ],
       "end_hour": 9
   },
}

UserChannelInfo

  • user_channel_id (string) Required

    The ID of user channel.

  • name (string) Required

    The name of user channel

  • state (UserChannelState) Required

    The state of user channel. ENABLED or DISABLED only.

  • data (Struct) Required

    The data for using user channel.

  • is_subscribe (bool) Required

    Indicates whether subscriptions will be used.

  • subscriptions (string) Repeated Required

    The topic list to subscription.

  • is_scheduled (bool) Required

    Indicates whether schedule will be used.

  • schedule (UserChannelSchedule) Required

    Schedule for which you want to receive notifications through the user channel.

  • tags (Struct) Required

    The tags for user channel.

  • domain_id (string) Required

    The ID of domain.

  • user_id (string) Required

    The ID of user using the user channel.

  • protocol_id (string) Required

    The ID of protocol set in the user channel.

  • user_secret_id (string) Required

    The ID of secret encrypted data in the security service

  • created_at (string) Required

    User channel creation time.

{
   "user_channel_id": "user-ch-123456789012",
   "name": "Email",
   "state": "ENABLED",
   "data": {
       "email": "user1@email.com"
   },
   "protocol_id": "protocol-123456789012",
   "user_id": "user1@email.com",
   "domain_id": "domain-123456789012",
   "created_at": "2022-01-01T08:28:49.108Z"
}

set_subscription #

Sets a subscription for a UserChannel. A subscription is a topic for channels to subscribe to and get notified about. If a UserChannel has subscriptions, a Notification is dispatched only if the topic of the Notification is the same as the one set in the subscriptions. If there is no subscription in a UserChannel, all Notifications will be dispatched.

POST /notification/v1/user-channel/set-subscription

UpdateUserChannelSubscriptionRequest

  • user_channel_id (string) Required

    The ID of user channel.

  • is_subscribe (bool) Required

    Indicates whether subscriptions will be used.

  • subscriptions (string) Repeated

    If is_subscribe is set to false, this value is ignored.

{
   "user_channel_id": "user-ch-28097e8d5d59",
   "is_subscribe": true,
   "subscriptions": [
       "monitoring.Alert"
   ],
}

UserChannelInfo

  • user_channel_id (string) Required

    The ID of user channel.

  • name (string) Required

    The name of user channel

  • state (UserChannelState) Required

    The state of user channel. ENABLED or DISABLED only.

  • data (Struct) Required

    The data for using user channel.

  • is_subscribe (bool) Required

    Indicates whether subscriptions will be used.

  • subscriptions (string) Repeated Required

    The topic list to subscription.

  • is_scheduled (bool) Required

    Indicates whether schedule will be used.

  • schedule (UserChannelSchedule) Required

    Schedule for which you want to receive notifications through the user channel.

  • tags (Struct) Required

    The tags for user channel.

  • domain_id (string) Required

    The ID of domain.

  • user_id (string) Required

    The ID of user using the user channel.

  • protocol_id (string) Required

    The ID of protocol set in the user channel.

  • user_secret_id (string) Required

    The ID of secret encrypted data in the security service

  • created_at (string) Required

    User channel creation time.

{
   "user_channel_id": "user-ch-123456789012",
   "name": "Email",
   "state": "ENABLED",
   "data": {
       "email": "user1@email.com"
   },
   "protocol_id": "protocol-123456789012",
   "user_id": "user1@email.com",
   "domain_id": "domain-123456789012",
   "created_at": "2022-01-01T08:28:49.108Z"
}

enable #

Enables a specific UserChannel. If a UserChannel is enabled, the UserChannel can be used and the Notification can be dispatched. Even if a UserChannel is enabled, if the Protocol used in the UserChannel is disabled, the Notification is not dispatched.

POST /notification/v1/user-channel/enable

UserChannelRequest

  • user_channel_id (string) Required

    The ID of user channel.

{
   "user_channel_id": "user-ch-123456789012"
}

UserChannelInfo

  • user_channel_id (string) Required

    The ID of user channel.

  • name (string) Required

    The name of user channel

  • state (UserChannelState) Required

    The state of user channel. ENABLED or DISABLED only.

  • data (Struct) Required

    The data for using user channel.

  • is_subscribe (bool) Required

    Indicates whether subscriptions will be used.

  • subscriptions (string) Repeated Required

    The topic list to subscription.

  • is_scheduled (bool) Required

    Indicates whether schedule will be used.

  • schedule (UserChannelSchedule) Required

    Schedule for which you want to receive notifications through the user channel.

  • tags (Struct) Required

    The tags for user channel.

  • domain_id (string) Required

    The ID of domain.

  • user_id (string) Required

    The ID of user using the user channel.

  • protocol_id (string) Required

    The ID of protocol set in the user channel.

  • user_secret_id (string) Required

    The ID of secret encrypted data in the security service

  • created_at (string) Required

    User channel creation time.

{
   "user_channel_id": "user-ch-123456789012",
   "name": "Email",
   "state": "ENABLED",
   "data": {
       "email": "user1@email.com"
   },
   "protocol_id": "protocol-123456789012",
   "user_id": "user1@email.com",
   "domain_id": "domain-123456789012",
   "created_at": "2022-01-01T08:28:49.108Z"
}

disable #

Disables a specific UserChannel. If a UserChannel is disabled, the Notification is not dispatched, even if it is created.

POST /notification/v1/user-channel/disable

UserChannelRequest

  • user_channel_id (string) Required

    The ID of user channel.

{
   "user_channel_id": "user-ch-123456789012"
}

UserChannelInfo

  • user_channel_id (string) Required

    The ID of user channel.

  • name (string) Required

    The name of user channel

  • state (UserChannelState) Required

    The state of user channel. ENABLED or DISABLED only.

  • data (Struct) Required

    The data for using user channel.

  • is_subscribe (bool) Required

    Indicates whether subscriptions will be used.

  • subscriptions (string) Repeated Required

    The topic list to subscription.

  • is_scheduled (bool) Required

    Indicates whether schedule will be used.

  • schedule (UserChannelSchedule) Required

    Schedule for which you want to receive notifications through the user channel.

  • tags (Struct) Required

    The tags for user channel.

  • domain_id (string) Required

    The ID of domain.

  • user_id (string) Required

    The ID of user using the user channel.

  • protocol_id (string) Required

    The ID of protocol set in the user channel.

  • user_secret_id (string) Required

    The ID of secret encrypted data in the security service

  • created_at (string) Required

    User channel creation time.

{
   "user_channel_id": "user-ch-123456789012",
   "name": "Email",
   "state": "ENABLED",
   "data": {
       "email": "user1@email.com"
   },
   "protocol_id": "protocol-123456789012",
   "user_id": "user1@email.com",
   "domain_id": "domain-123456789012",
   "created_at": "2022-01-01T08:28:49.108Z"
}

delete #

Deletes a specific UserChannel. You must specify the user_channel_id of the UserChannel to delete.

POST /notification/v1/user-channel/delete

UserChannelRequest

  • user_channel_id (string) Required

    The ID of user channel.

{
   "user_channel_id": "user-ch-123456789012"
}

get #

Gets a specific UserChannel. Prints detailed information about the UserChannel, including the Protocol configured and the Notification settings.

POST /notification/v1/user-channel/get

UserChannelRequest

  • user_channel_id (string) Required

    The ID of user channel.

{
   "user_channel_id": "user-ch-123456789012"
}

UserChannelInfo

  • user_channel_id (string) Required

    The ID of user channel.

  • name (string) Required

    The name of user channel

  • state (UserChannelState) Required

    The state of user channel. ENABLED or DISABLED only.

  • data (Struct) Required

    The data for using user channel.

  • is_subscribe (bool) Required

    Indicates whether subscriptions will be used.

  • subscriptions (string) Repeated Required

    The topic list to subscription.

  • is_scheduled (bool) Required

    Indicates whether schedule will be used.

  • schedule (UserChannelSchedule) Required

    Schedule for which you want to receive notifications through the user channel.

  • tags (Struct) Required

    The tags for user channel.

  • domain_id (string) Required

    The ID of domain.

  • user_id (string) Required

    The ID of user using the user channel.

  • protocol_id (string) Required

    The ID of protocol set in the user channel.

  • user_secret_id (string) Required

    The ID of secret encrypted data in the security service

  • created_at (string) Required

    User channel creation time.

{
   "user_channel_id": "user-ch-123456789012",
   "name": "Email",
   "state": "ENABLED",
   "data": {
       "email": "user1@email.com"
   },
   "protocol_id": "protocol-123456789012",
   "user_id": "user1@email.com",
   "domain_id": "domain-123456789012",
   "created_at": "2022-01-01T08:28:49.108Z"
}

list #

Gets a list of all UserChannels. You can use a query to get a filtered list of UserChannels.

POST /notification/v1/user-channel/list

UserChannelQuery

  • query (Query)

    Query format provided by SpaceONE. Please check the link for more information.

  • user_channel_id (string)

    The ID of user channel.

  • name (string)

    The name of user channel. It can have a maximum of 255 characters.

  • state (UserChannelState)

    The state of user channel. ENABLED or DISABLED only.

  • is_subscribe (bool)

    Indicates whether subscriptions will be used.

  • is_scheduled (bool)

    Indicates whether schedule will be used.

  • protocol_id (string)

    The ID of protocol set in the user channel.

  • user_secret_id (string)

    The ID of secret encrypted data in the security service

{
   "query": {}
}

UserChannelsInfo

  • results (UserChannelInfo) Repeated Required

    List of queried user channels.

  • total_count (int32) Required

    Total counts of queried user channels.

{
   "results": [
       {
           "user_channel_id": "user-ch-123456789012",
           "name": "Email",
           "state": "ENABLED",
           "data": {
               "email": "user1@email.com"
           },
           "protocol_id": "protocol-123456789012",
           "user_id": "user1@email.com",
           "domain_id": "domain-123456789012",
           "created_at": "2022-01-01T08:28:49.108Z"
       },
       {
           "user_channel_id": "user-ch-98765432109",
           "name": "Email",
           "state": "ENABLED",
           "data": {
               "email": "user2@email.com"
           },
           "is_scheduled": true,
           "schedule": {
               "day_of_week": [
                   "MON",
                   "TUE",
                   "WED",
                   "THU",
                   "FRI"
               ],
               "start_hour": 3,
               "end_hour": 23
           },
           "protocol_id": "protocol-123456789012",
           "user_id": "user2@email.com",
           "domain_id": "domain-123456789012",
           "created_at": "2022-01-01T06:45:57.260Z"
       }
   ],
   "total_count": 2
}

stat #

POST /notification/v1/user-channel/stat



Message #

CreateUserChannelRequest #

  • protocol_id (string) Required

    The ID of protocol that will be set in user channel.

  • name (string) Required

    The name of User Channel. It can have a maximum of 255 characters.

  • data (Struct) Required

    The data for using user channel. This data is encrypted and stored in the Secret service if JSON schema in the protocol’s metadata is set to SECRET type. In this case, the secret ID that is stored in the security service will be returned and the data value will be empty. if JSON schema in the protocol’s metadata is set to PLAIN_TEXT type, This data is not encrypted and stored directly in the DB.

  • is_subscribe (bool)

    Indicates whether subscriptions will be used.

  • subscriptions (string) Repeated

    When using subscriptions, it indicates the topic list to subscription. If is_subscribe is set to false, this value is ignored.

  • is_scheduled (bool)

    Indicates whether schedule will be used.

  • schedule (UserChannelSchedule)

    Schedule for which you want to receive notifications through the user channel.

  • tags (Struct)

    The tags for user channel.


UpdateUserChannelRequest #

  • user_channel_id (string) Required

    The ID of user channel.

  • name (string)

    The name of user channel. It can have a maximum of 255 characters.

  • data (Struct)

    The data for using user channel. This data is encrypted and stored in the Secret service if JSON schema in the protocol’s metadata is set to SECRET type. In this case, the secret ID that is stored in the security service will be returned and the data value will be empty. if JSON schema in the protocol’s metadata is set to PLAIN_TEXT type, This data is not encrypted and stored directly in the DB.

  • schedule (UserChannelSchedule)

    Set the level of notification. If a notification has a level and a notification level that this channel can receive is set, a notification is dispatched only if the notification level is the same.

  • tags (Struct)

    The tags for user channel.


UpdateUserChannelScheduleRequest #

  • user_channel_id (string) Required

    The ID of user channel.

  • is_scheduled (bool) Required

    Indicates whether schedule will be used.

  • schedule (UserChannelSchedule)

    Schedule for which you want to receive notifications through the user channel.


UpdateUserChannelSubscriptionRequest #

  • user_channel_id (string) Required

    The ID of user channel.

  • is_subscribe (bool) Required

    Indicates whether subscriptions will be used.

  • subscriptions (string) Repeated

    If is_subscribe is set to false, this value is ignored.


UserChannelInfo #

  • user_channel_id (string) Required

    The ID of user channel.

  • name (string) Required

    The name of user channel

  • state (UserChannelState) Required

    The state of user channel. ENABLED or DISABLED only.

  • data (Struct) Required

    The data for using user channel.

  • is_subscribe (bool) Required

    Indicates whether subscriptions will be used.

  • subscriptions (string) Repeated Required

    The topic list to subscription.

  • is_scheduled (bool) Required

    Indicates whether schedule will be used.

  • schedule (UserChannelSchedule) Required

    Schedule for which you want to receive notifications through the user channel.

  • tags (Struct) Required

    The tags for user channel.

  • domain_id (string) Required

    The ID of domain.

  • user_id (string) Required

    The ID of user using the user channel.

  • protocol_id (string) Required

    The ID of protocol set in the user channel.

  • user_secret_id (string) Required

    The ID of secret encrypted data in the security service

  • created_at (string) Required

    User channel creation time.


UserChannelQuery #

  • query (Query)

    Query format provided by SpaceONE. Please check the link for more information.

  • user_channel_id (string)

    The ID of user channel.

  • name (string)

    The name of user channel. It can have a maximum of 255 characters.

  • state (UserChannelState)

    The state of user channel. ENABLED or DISABLED only.

  • is_subscribe (bool)

    Indicates whether subscriptions will be used.

  • is_scheduled (bool)

    Indicates whether schedule will be used.

  • protocol_id (string)

    The ID of protocol set in the user channel.

  • user_secret_id (string)

    The ID of secret encrypted data in the security service


UserChannelRequest #

  • user_channel_id (string) Required

    The ID of user channel.


UserChannelSchedule #

  • day_of_week (DayOfWeek) Repeated Required

    Day of the week to be notified. As a list type, only types that can be specified from MON to SUN can be set.

  • start_hour (int32) Required

    Start time to receive notifications. Only integer type can be set, and 0 to 23 can be.

  • end_hour (int32) Required

    End time to receive notifications. Only integer type can be set, and 1 to 24 can be.


UserChannelStatQuery #

  • query (StatisticsQuery) Required

    Statistics Query format provided by SpaceONE. Please check the link for more information.


UserChannelsInfo #

  • results (UserChannelInfo) Repeated Required

    List of queried user channels.

  • total_count (int32) Required

    Total counts of queried user channels.


Calendar November 4, 2024
Edit Edit this page