Notification Project (0.0.1)

Download OpenAPI specification:Download

Authentication

BearerAuth

The Authorization header must be set to Bearer followed by a space and a token. For example, 'Bearer vHUabiBEIKi8n1RdvWOjGFulGSM6zunb'.

Security scheme type: API Key
Header parameter name: Authorization

notification

Query a list of addresses that meet the query criteria.

Authorizations:
query Parameters
address_id
Array of strings

address id.

address_list_id
Array of strings

address list id.

address
Array of strings

address details, could be email address for email, user id for websocket, mobile number for sms.

notify_type
Array of strings

the notification type , eg:[email|websocket|sms|wechat].

status
Array of strings

address status, eg:[active|disabled|deleted].

limit
integer <int64>

data limit per page, default value 20, max value 200.

offset
integer <int64>

beginning data offset of this page, default 0.

search_word
string

query key, support these fields(address_id,address,notify_type,remarks).

sort_key
string

sort key, order by sort_key, default create_time.

reverse
boolean <boolean>

value = 0 sort ASC, value = 1 sort DESC.

display_columns
Array of strings

select columns to display, currently not support.

Responses

200

A successful response.

get /kapis/notification.kubesphere.io/v1/addresses
./kapis/notification.kubesphere.io/v1/addresses

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "total_count": 0,
  • "address_set":
    [
    ]
}

Delete a list of addresses.

Authorizations:
Request Body schema: application/json
address_id
Array of strings (required, address id)

Responses

200

A successful response.

delete /kapis/notification.kubesphere.io/v1/addresses
./kapis/notification.kubesphere.io/v1/addresses

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "address_id":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "address_id":
    [
    ]
}

Create a recipient address.

Authorizations:
Request Body schema: application/json
address
string

required, address details, could be email address for email, user id for websocket, mobile number for sms.

remarks
string (remarks for address)
verification_code
string (verification code for register address at the first time)
notify_type
string (required, the notification type , eg:[email|websocket|sms|wechat])

Responses

200

A successful response.

post /kapis/notification.kubesphere.io/v1/addresses
./kapis/notification.kubesphere.io/v1/addresses

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "address": "string",
  • "remarks": "string",
  • "verification_code": "string",
  • "notify_type": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "address_id": "string"
}

Modify one address.

Authorizations:
path Parameters
address
required
string

required, address id

Request Body schema: application/json
address
string (required, address id)
address_detail
string

address details, could be email address for email, user id for websocket, mobile number for sms.

remarks
string (remarks for address)
verification_code
string (verification code for register address at the first time)
notify_type
string (the notification type, eg:[email|websocket|sms|wechat])

Responses

200

A successful response.

put /kapis/notification.kubesphere.io/v1/addresses/{address}
./kapis/notification.kubesphere.io/v1/addresses/{address}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "address": "string",
  • "address_detail": "string",
  • "remarks": "string",
  • "verification_code": "string",
  • "notify_type": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "address_id": "string"
}

Query a list of addresslists that meet the query criteria.

Authorizations:
query Parameters
address_list_id
Array of strings

address list id.

address_list_name
Array of strings

the name of the address list.

extra
Array of strings

the extra info of the address.

status
Array of strings

address list status, eg:[active|disabled|deleted].

limit
integer <int64>

data limit per page, default value 20, max value 200.

offset
integer <int64>

beginning data offset of this page, default 0.

search_word
string

query key, support these fields(address_list_id,address_list_name,address_list_name,extra).

sort_key
string

sort key, order by sort_key, default create_time.

reverse
boolean <boolean>

value = 0 sort ASC, value = 1 sort DESC.

display_columns
Array of strings

select columns to display, currently not support.

Responses

200

A successful response.

get /kapis/notification.kubesphere.io/v1/addresslists
./kapis/notification.kubesphere.io/v1/addresslists

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "total_count": 0,
  • "address_list_set":
    [
    ]
}

Delete a list of addresslist.

Authorizations:
Request Body schema: application/json
address_list_id
Array of strings (required, address list id)

Responses

200

A successful response.

delete /kapis/notification.kubesphere.io/v1/addresslists
./kapis/notification.kubesphere.io/v1/addresslists

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "address_list_id":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "address_list_id":
    [
    ]
}

Create a list of addresses of the recipients.

Authorizations:
Request Body schema: application/json
address_list_name
string (the name of the address list)
extra
string (the extra info of the address)
address_id
Array of strings (required, the address ids for the address list to create)

Responses

200

A successful response.

post /kapis/notification.kubesphere.io/v1/addresslists
./kapis/notification.kubesphere.io/v1/addresslists

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "address_list_name": "string",
  • "extra": "string",
  • "address_id":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "address_list_id": "string"
}

Modify one address list.

Authorizations:
path Parameters
addresslist
required
string

required, address list id

Request Body schema: application/json
addresslist
string (required, address list id)
address_list_name
string (address list name)
extra
string (the extra info of the address list)
status
string (address list status, eg:[active|disabled|deleted])
address_id
Array of strings (address ids of the address list)

Responses

200

A successful response.

put /kapis/notification.kubesphere.io/v1/addresslists/{addresslist}
./kapis/notification.kubesphere.io/v1/addresslists/{addresslist}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "addresslist": "string",
  • "address_list_name": "string",
  • "extra": "string",
  • "status": "string",
  • "address_id":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "address_list_id": "string"
}

Describe notifications

Authorizations:
query Parameters
notification_id
Array of strings

notification id.

content_type
Array of strings

notification content type, eg:[invite|verify|fee|business|alert|other|event].

owner
Array of strings

notification owner.

status
Array of strings

notification status, eg:[pending|sending|successful|failed].

limit
integer <int64>

data limit per page, default value 20, max value 200.

offset
integer <int64>

beginning data offset of this page, default 0.

search_word
string

query key, support these fields(notification_id,content_type,title,short_content,address_info,status,owner).

sort_key
string

sort key, order by sort_key, default create_time.

reverse
boolean <boolean>

value = 0 sort ASC, value = 1 sort DESC.

display_columns
Array of strings

select columns to display, currently not support.

Responses

200

A successful response.

get /kapis/notification.kubesphere.io/v1/notifications
./kapis/notification.kubesphere.io/v1/notifications

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "total_count": 0,
  • "notification_set":
    [
    ]
}

Create notification

Authorizations:
Request Body schema: application/json
content_type
string (required, notification content type, eg:[invite|verify|fee|business|alert|other|event])
title
string (required, notification title)
content
string (notification content, json fmt, eg:{"html":"test_content_html", "normal":"test_content_normal"})
short_content
string (notification short content)
expired_days
integer <int64>

notification expired days, 0 is for never expired.

owner
string (notification owner)
address_info
string

the address to send the notification, json fmt, currently support 2 kinds types. 1.key/value Type, key is the notification send Type,the value is the list of address, eg:{"email": ["xxx1@163.com", "xxx2@163.com"],"websocket": ["system", "user1"]} 2.Array Type, eg:["adl-xxxx1", "adl-xxxx2"], the item is the address list id which is already created in advance.

available_start_time
string (the available start time to receive notification)
available_end_time
string (the available end time to receive notification)
extra
string (extra info is only used for websocket notification,to show which websocket client could accept it. eg:"{"ws_service": "ks","ws_message_type": "event"}")

Responses

200

A successful response.

post /kapis/notification.kubesphere.io/v1/notifications
./kapis/notification.kubesphere.io/v1/notifications

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "content_type": "string",
  • "title": "string",
  • "content": "string",
  • "short_content": "string",
  • "expired_days": 0,
  • "owner": "string",
  • "address_info": "string",
  • "available_start_time": "string",
  • "available_end_time": "string",
  • "extra": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "notification_id": "string"
}

Retry notifications

Authorizations:
Request Body schema: application/json
notification_id
Array of strings (required, notification ids to retry)

Responses

200

A successful response.

post /kapis/notification.kubesphere.io/v1/notifications/retry
./kapis/notification.kubesphere.io/v1/notifications/retry

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "notification_id":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "notification_set":
    [
    ]
}

Get service configration

Authorizations:
query Parameters
service_type
Array of strings

required, service type.

Responses

200

A successful response.

get /kapis/notification.kubesphere.io/v1/serviceconfigs
./kapis/notification.kubesphere.io/v1/serviceconfigs

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "email_service_config":
    {
    }
}

Set service configration

Authorizations:
Request Body schema: application/json
email_service_config
object (pbEmailServiceConfig)

Responses

200

A successful response.

post /kapis/notification.kubesphere.io/v1/serviceconfigs
./kapis/notification.kubesphere.io/v1/serviceconfigs

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "email_service_config":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "is_succ": true
}

Validate email service

Authorizations:
Request Body schema: application/json
email_service_config
object (pbEmailServiceConfig)

Responses

200

A successful response.

post /kapis/notification.kubesphere.io/v1/serviceconfigs/validation
./kapis/notification.kubesphere.io/v1/serviceconfigs/validation

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "email_service_config":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "is_succ": true
}

Describe tasks

Authorizations:
query Parameters
task_id
Array of strings

task id.

notification_id
Array of strings

the notification id of the task, one notification may send out by serval tasks.

error_code
Array of strings

error code, if task run failed will return a error code.

status
Array of strings

the task execution status, eg:[pending|sending|successful|failed].

limit
integer <int64>

data limit per page, default value 20, max value 200.

offset
integer <int64>

beginning data offset of this page, default 0.

search_word
string

query key, support these fields(task_id,notification_id,status,error_code).

sort_key
string

sort key, order by sort_key, default create_time.

reverse
boolean <boolean>

value = 0 sort ASC, value = 1 sort DESC.

display_columns
Array of strings

select columns to display, currently not support.

Responses

200

A successful response.

get /kapis/notification.kubesphere.io/v1/tasks
./kapis/notification.kubesphere.io/v1/tasks

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "total_count": 0,
  • "task_set":
    [
    ]
}

Retry tasks

Authorizations:
Request Body schema: application/json
task_id
Array of strings (required, task ids to retry)

Responses

200

A successful response.

post /kapis/notification.kubesphere.io/v1/tasks/retry
./kapis/notification.kubesphere.io/v1/tasks/retry

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "task_id":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "task_set":
    [
    ]
}