Protocol #
A Protocol defines the method to use when dispatching Notifications via a channel.
Package : spaceone.api.notification.v1
Protocol #
Protocol Methods:
create #
Creates a new Protocol. When creating a protocol, you must specify the plugins provided from the repository, and you must also set the credentials to be set in the plugin if necessary.
POST /notification/v1/protocol/create
name (string)
RequiredThe name of Protocol. It can have a maximum of 255 characters.
plugin_info (PluginRequest)
RequiredDescribe a Plugin information for protocol that include was used plugin, specific version, schema etc.
tags (Struct)
The tags for protocol.
{
"name": "Email",
"plugin_info": {
"plugin_id": "plugin-email-noti-protocol",
"version": "1.0.1",
"options": {},
"secret_id": "secret-123546789012",
"metadata": {
"data": {
"schema": {
"properties": {
"email": {
"pattern": "^[\\W]*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4}[\\W]*,{1}[\\W]*)*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4})[\\W]*$",
"examples": [
"user1@test.com, user2@test.com"
],
"minLength": 10.0,
"description": "Email address to receive notifications",
"type": "string",
"title": "Email Address"
}
},
"required": [
"email"
],
"type": "object"
}
},
"data_type": "PLAIN_TEXT"
},
"upgrade_mode": "AUTO"
},
"tags": {}
}protocol_id (string)
RequiredThe ID of Protocol.
name (string)
RequiredThe name of Protocol.
state (ProtocolState)
RequiredThe state of Protocol. ENABLED or DISABLED only.
protocol_type (ProtocolType)
Requireddesc : The type of Protocol. INTERNAL or EXTERNAL only.
resource_type (string)
Requireddesc : Resource type for Protocol. Currently only identity.Project or identity.User can be set.
capability (Struct)
Requireddesc : The capability information for the Protocol. It included supported schema for the Protocol.
plugin_info (PluginInfo)
Requiredthe plugin information set in Protocol.
tags (Struct)
RequiredThe tags for protocol.
domain_id (string)
RequiredThe ID of domain to which the Protocol belongs.
created_at (string)
RequiredProtocol creation time.
{
"protocol_id": "protocol-123546789012",
"name": "Email",
"state": "ENABLED",
"protocol_type": "EXTERNAL",
"capability": {
"supported_schema": [
"email_smtp"
]
},
"plugin_info": {
"plugin_id": "plugin-email-noti-protocol",
"version": "1.0.1",
"options": {},
"secret_id": "secret-123546789012",
"metadata": {
"data": {
"schema": {
"properties": {
"email": {
"pattern": "^[\\W]*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4}[\\W]*,{1}[\\W]*)*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4})[\\W]*$",
"examples": [
"user1@test.com, user2@test.com"
],
"minLength": 10.0,
"description": "Email address to receive notifications",
"type": "string",
"title": "Email Address"
}
},
"required": [
"email"
],
"type": "object"
}
},
"data_type": "PLAIN_TEXT"
},
"upgrade_mode": "AUTO"
},
"tags": {},
"domain_id": "domain-123546789012",
"created_at": "2022-01-01T07:55:57.043Z"
}update #
Updates a specific Protocol. The method update can update the name and tags only. If you want to update the plugin version or options, you can use update_plugin method.
POST /notification/v1/protocol/update
protocol_id (string)
RequiredThe ID of Protocol.
name (string)
The Name of Protocol. It can have a maximum of 255 characters.
tags (Struct)
The tags for protocol. When updating, existing tag information is deleted all and will be updated with new.
{
"protocol_id": "protocol-123456789012",
"name": "Email-test",
"tags": {
"type": "test"
}
}protocol_id (string)
RequiredThe ID of Protocol.
name (string)
RequiredThe name of Protocol.
state (ProtocolState)
RequiredThe state of Protocol. ENABLED or DISABLED only.
protocol_type (ProtocolType)
Requireddesc : The type of Protocol. INTERNAL or EXTERNAL only.
resource_type (string)
Requireddesc : Resource type for Protocol. Currently only identity.Project or identity.User can be set.
capability (Struct)
Requireddesc : The capability information for the Protocol. It included supported schema for the Protocol.
plugin_info (PluginInfo)
Requiredthe plugin information set in Protocol.
tags (Struct)
RequiredThe tags for protocol.
domain_id (string)
RequiredThe ID of domain to which the Protocol belongs.
created_at (string)
RequiredProtocol creation time.
{
"protocol_id": "protocol-123546789012",
"name": "Email",
"state": "ENABLED",
"protocol_type": "EXTERNAL",
"capability": {
"supported_schema": [
"email_smtp"
]
},
"plugin_info": {
"plugin_id": "plugin-email-noti-protocol",
"version": "1.0.1",
"options": {},
"secret_id": "secret-123546789012",
"metadata": {
"data": {
"schema": {
"properties": {
"email": {
"pattern": "^[\\W]*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4}[\\W]*,{1}[\\W]*)*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4})[\\W]*$",
"examples": [
"user1@test.com, user2@test.com"
],
"minLength": 10.0,
"description": "Email address to receive notifications",
"type": "string",
"title": "Email Address"
}
},
"required": [
"email"
],
"type": "object"
}
},
"data_type": "PLAIN_TEXT"
},
"upgrade_mode": "AUTO"
},
"tags": {},
"domain_id": "domain-123546789012",
"created_at": "2022-01-01T07:55:57.043Z"
}update_plugin #
Updates a plugin for a Protocol. It is usually used when redeploying a plugin to a new version.
POST /notification/v1/protocol/update-plugin
protocol_id (string)
RequiredThe ID of Protocol.
domain_id (string)
RequiredThe ID of domain to which the Protocol belongs.
version (string)
The version of plugin you want to update. Version means the tags of plugin container image in repository that specific market place.
options (Struct)
The Options that contains information about using plugin.
{
"protocol_id": "protocol-123456789012",
"version": "1.0.2",
"options": {}
}protocol_id (string)
RequiredThe ID of Protocol.
name (string)
RequiredThe name of Protocol.
state (ProtocolState)
RequiredThe state of Protocol. ENABLED or DISABLED only.
protocol_type (ProtocolType)
Requireddesc : The type of Protocol. INTERNAL or EXTERNAL only.
resource_type (string)
Requireddesc : Resource type for Protocol. Currently only identity.Project or identity.User can be set.
capability (Struct)
Requireddesc : The capability information for the Protocol. It included supported schema for the Protocol.
plugin_info (PluginInfo)
Requiredthe plugin information set in Protocol.
tags (Struct)
RequiredThe tags for protocol.
domain_id (string)
RequiredThe ID of domain to which the Protocol belongs.
created_at (string)
RequiredProtocol creation time.
{
"protocol_id": "protocol-123546789012",
"name": "Email",
"state": "ENABLED",
"protocol_type": "EXTERNAL",
"capability": {
"supported_schema": [
"email_smtp"
]
},
"plugin_info": {
"plugin_id": "plugin-email-noti-protocol",
"version": "1.0.1",
"options": {},
"secret_id": "secret-123546789012",
"metadata": {
"data": {
"schema": {
"properties": {
"email": {
"pattern": "^[\\W]*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4}[\\W]*,{1}[\\W]*)*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4})[\\W]*$",
"examples": [
"user1@test.com, user2@test.com"
],
"minLength": 10.0,
"description": "Email address to receive notifications",
"type": "string",
"title": "Email Address"
}
},
"required": [
"email"
],
"type": "object"
}
},
"data_type": "PLAIN_TEXT"
},
"upgrade_mode": "AUTO"
},
"tags": {},
"domain_id": "domain-123546789012",
"created_at": "2022-01-01T07:55:57.043Z"
}enable #
Enables a specific Protocol. If the Protocol is enabled, the Protocol can be used and the Notification can be dispatched.
POST /notification/v1/protocol/enable
protocol_id (string)
RequiredThe ID of Protocol.
{
"protocol_id": "protocol-123456789012"
}protocol_id (string)
RequiredThe ID of Protocol.
name (string)
RequiredThe name of Protocol.
state (ProtocolState)
RequiredThe state of Protocol. ENABLED or DISABLED only.
protocol_type (ProtocolType)
Requireddesc : The type of Protocol. INTERNAL or EXTERNAL only.
resource_type (string)
Requireddesc : Resource type for Protocol. Currently only identity.Project or identity.User can be set.
capability (Struct)
Requireddesc : The capability information for the Protocol. It included supported schema for the Protocol.
plugin_info (PluginInfo)
Requiredthe plugin information set in Protocol.
tags (Struct)
RequiredThe tags for protocol.
domain_id (string)
RequiredThe ID of domain to which the Protocol belongs.
created_at (string)
RequiredProtocol creation time.
{
"protocol_id": "protocol-123546789012",
"name": "Email",
"state": "ENABLED",
"protocol_type": "EXTERNAL",
"capability": {
"supported_schema": [
"email_smtp"
]
},
"plugin_info": {
"plugin_id": "plugin-email-noti-protocol",
"version": "1.0.1",
"options": {},
"secret_id": "secret-123546789012",
"metadata": {
"data": {
"schema": {
"properties": {
"email": {
"pattern": "^[\\W]*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4}[\\W]*,{1}[\\W]*)*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4})[\\W]*$",
"examples": [
"user1@test.com, user2@test.com"
],
"minLength": 10.0,
"description": "Email address to receive notifications",
"type": "string",
"title": "Email Address"
}
},
"required": [
"email"
],
"type": "object"
}
},
"data_type": "PLAIN_TEXT"
},
"upgrade_mode": "AUTO"
},
"tags": {},
"domain_id": "domain-123546789012",
"created_at": "2022-01-01T07:55:57.043Z"
}disable #
Disables a specific Protocol. If a Protocol is disabled, the Notification will not be dispatched, even if it is created.
POST /notification/v1/protocol/disable
protocol_id (string)
RequiredThe ID of Protocol.
{
"protocol_id": "protocol-123456789012"
}protocol_id (string)
RequiredThe ID of Protocol.
name (string)
RequiredThe name of Protocol.
state (ProtocolState)
RequiredThe state of Protocol. ENABLED or DISABLED only.
protocol_type (ProtocolType)
Requireddesc : The type of Protocol. INTERNAL or EXTERNAL only.
resource_type (string)
Requireddesc : Resource type for Protocol. Currently only identity.Project or identity.User can be set.
capability (Struct)
Requireddesc : The capability information for the Protocol. It included supported schema for the Protocol.
plugin_info (PluginInfo)
Requiredthe plugin information set in Protocol.
tags (Struct)
RequiredThe tags for protocol.
domain_id (string)
RequiredThe ID of domain to which the Protocol belongs.
created_at (string)
RequiredProtocol creation time.
{
"protocol_id": "protocol-123546789012",
"name": "Email",
"state": "ENABLED",
"protocol_type": "EXTERNAL",
"capability": {
"supported_schema": [
"email_smtp"
]
},
"plugin_info": {
"plugin_id": "plugin-email-noti-protocol",
"version": "1.0.1",
"options": {},
"secret_id": "secret-123546789012",
"metadata": {
"data": {
"schema": {
"properties": {
"email": {
"pattern": "^[\\W]*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4}[\\W]*,{1}[\\W]*)*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4})[\\W]*$",
"examples": [
"user1@test.com, user2@test.com"
],
"minLength": 10.0,
"description": "Email address to receive notifications",
"type": "string",
"title": "Email Address"
}
},
"required": [
"email"
],
"type": "object"
}
},
"data_type": "PLAIN_TEXT"
},
"upgrade_mode": "AUTO"
},
"tags": {},
"domain_id": "domain-123546789012",
"created_at": "2022-01-01T07:55:57.043Z"
}delete #
Deletes a specific Protocol. If there exists a channel using the Protocol, it cannot be deleted.
POST /notification/v1/protocol/delete
protocol_id (string)
RequiredThe ID of Protocol.
{
"protocol_id": "protocol-123456789012"
}get #
Gets a specific Protocol. Prints detailed information about the Protocol.
POST /notification/v1/protocol/get
protocol_id (string)
RequiredThe ID of Protocol.
{
"protocol_id": "protocol-123456789012"
}protocol_id (string)
RequiredThe ID of Protocol.
name (string)
RequiredThe name of Protocol.
state (ProtocolState)
RequiredThe state of Protocol. ENABLED or DISABLED only.
protocol_type (ProtocolType)
Requireddesc : The type of Protocol. INTERNAL or EXTERNAL only.
resource_type (string)
Requireddesc : Resource type for Protocol. Currently only identity.Project or identity.User can be set.
capability (Struct)
Requireddesc : The capability information for the Protocol. It included supported schema for the Protocol.
plugin_info (PluginInfo)
Requiredthe plugin information set in Protocol.
tags (Struct)
RequiredThe tags for protocol.
domain_id (string)
RequiredThe ID of domain to which the Protocol belongs.
created_at (string)
RequiredProtocol creation time.
{
"protocol_id": "protocol-123546789012",
"name": "Email",
"state": "ENABLED",
"protocol_type": "EXTERNAL",
"capability": {
"supported_schema": [
"email_smtp"
]
},
"plugin_info": {
"plugin_id": "plugin-email-noti-protocol",
"version": "1.0.1",
"options": {},
"secret_id": "secret-123546789012",
"metadata": {
"data": {
"schema": {
"properties": {
"email": {
"pattern": "^[\\W]*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4}[\\W]*,{1}[\\W]*)*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4})[\\W]*$",
"examples": [
"user1@test.com, user2@test.com"
],
"minLength": 10.0,
"description": "Email address to receive notifications",
"type": "string",
"title": "Email Address"
}
},
"required": [
"email"
],
"type": "object"
}
},
"data_type": "PLAIN_TEXT"
},
"upgrade_mode": "AUTO"
},
"tags": {},
"domain_id": "domain-123546789012",
"created_at": "2022-01-01T07:55:57.043Z"
}list #
Gets a list of Protocols. You can use a query to get a filtered list of Protocols.
POST /notification/v1/protocol/list
query (Query)
Query format provided by SpaceONE. Please check the link for more information.
protocol_id (string)
The ID of Protocol.
name (string)
The name of Protocol.
state (ProtocolState)
The state of Protocol. ENABLED or DISABLED only.
protocol_type (ProtocolType)
The type of Protocol. INTERNAL or EXTERNAL only.
{
"query": {}
}results (ProtocolInfo)
RepeatedRequiredList of queried protocols.
total_count (int32)
RequiredTotal counts of queried Protocols.
{
"results":[
{
"protocol_id":"protocol-123456789012",
"name":"Email",
"state":"ENABLED",
"protocol_type":"EXTERNAL",
"capability":{
"supported_schema":[
"email_smtp"
]
},
"plugin_info":{
"plugin_id":"plugin-email-noti-protocol",
"version":"1.0.1",
"options":{
},
"secret_id":"secret-123456789012",
"metadata":{
"data_type":"PLAIN_TEXT",
"data":{
"schema":{
"properties":{
"email":{
"pattern":"^[\\W]*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4}[\\W]*,{1}[\\W]*)*([\\w+\\-.%]+@[\\w\\-.]+\\.[A-Za-z]{2,4})[\\W]*$",
"examples":[
"user1@test.com, user2@test.com"
],
"minLength":10.0,
"description":"Email address to receive notifications",
"type":"string",
"title":"Email Address"
}
},
"required":[
"email"
],
"type":"object"
}
}
},
"upgrade_mode":"AUTO"
},
"tags":{
},
"domain_id":"domain-123456789012",
"created_at":"2022-01-01T07:55:57.043Z"
}
],
"total_count":1
}stat #
POST /notification/v1/protocol/stat
Message #
CreateProtocolRequest #
name (string)
RequiredThe name of Protocol. It can have a maximum of 255 characters.
plugin_info (PluginRequest)
RequiredDescribe a Plugin information for protocol that include was used plugin, specific version, schema etc.
tags (Struct)
The tags for protocol.
PluginInfo #
plugin_id (string)
RequiredThe ID of plugin set in the Protocol.
version (string)
RequiredThe version of plugin.
options (Struct)
RequiredThe Options that contains information about using plugin.
metadata (Struct)
RequiredThe metadata of plugin. It includes schema for the data that must be set for the Channel when creating the Channel using a Protocol. The schema follows the JSON Schema format.
upgrade_mode (UpgradeMode)
RequiredAuto upgrade for plugin. If the upgrade_mode is AUTO, check the latest plugin version when running the plugin, and if a new version is existed, replace the plugin and then run it.
secret_id (string)
The ID of the Secret containing encrypted data to be used in the plugin.
PluginRequest #
plugin_id (string)
RequiredThe ID of plugin.
version (string)
RequiredThe version of plugin.
options (Struct)
The Options that contains information about using plugin.
secret_data (Struct)
The data for using plugin if necessary. This data is encrypted and stored in the Secret service.
schema (string)
The name of schema. When the secret_data is stored in the Secret service, it can be set with schema if the schema is existed. The schema is provided through the Repository service.
upgrade_mode (UpgradeMode)
Auto upgrade feature for plugin. If the upgrade mode is AUTO, check the latest plugin version when running the plugin, and if a new version is existed, replace the plugin and then run it.
ProtocolInfo #
protocol_id (string)
RequiredThe ID of Protocol.
name (string)
RequiredThe name of Protocol.
state (ProtocolState)
RequiredThe state of Protocol. ENABLED or DISABLED only.
protocol_type (ProtocolType)
Requireddesc : The type of Protocol. INTERNAL or EXTERNAL only.
resource_type (string)
Requireddesc : Resource type for Protocol. Currently only identity.Project or identity.User can be set.
capability (Struct)
Requireddesc : The capability information for the Protocol. It included supported schema for the Protocol.
plugin_info (PluginInfo)
Requiredthe plugin information set in Protocol.
tags (Struct)
RequiredThe tags for protocol.
domain_id (string)
RequiredThe ID of domain to which the Protocol belongs.
created_at (string)
RequiredProtocol creation time.
ProtocolQuery #
query (Query)
Query format provided by SpaceONE. Please check the link for more information.
protocol_id (string)
The ID of Protocol.
name (string)
The name of Protocol.
state (ProtocolState)
The state of Protocol. ENABLED or DISABLED only.
protocol_type (ProtocolType)
The type of Protocol. INTERNAL or EXTERNAL only.
ProtocolRequest #
protocol_id (string)
RequiredThe ID of Protocol.
ProtocolStatQuery #
query (StatisticsQuery)
RequiredStatistics Query format provided by SpaceONE. Please check the link for more information.
ProtocolsInfo #
results (ProtocolInfo)
RepeatedRequiredList of queried protocols.
total_count (int32)
RequiredTotal counts of queried Protocols.
UpdateProtocolPluginRequest #
protocol_id (string)
RequiredThe ID of Protocol.
domain_id (string)
RequiredThe ID of domain to which the Protocol belongs.
version (string)
The version of plugin you want to update. Version means the tags of plugin container image in repository that specific market place.
options (Struct)
The Options that contains information about using plugin.
UpdateProtocolRequest #
protocol_id (string)
RequiredThe ID of Protocol.
name (string)
The Name of Protocol. It can have a maximum of 255 characters.
tags (Struct)
The tags for protocol. When updating, existing tag information is deleted all and will be updated with new.