Skip to main content

Notification

Method & Permission​

APIGETPOSTPUTPATCHDELETE
Organization ListUserUser---
Organization DetailUser--UserUser

GET Notification List​

Endpoint: /notifications/notification/list/{level}/{sid}/{serializer}/

Get a list of notifications. You only get the notifications that sent to you.

Parameter: level (path, string)​

organization

Parameter: sid (path, string)​

organization sid

Parameter: serializer (path, string)​

list or detail

Parameter: `` (header, string)​

Response: 200​

# serializer = name
{
"page_size": 10,
"page_number": 1,
"page_count": 2,
"count": 12,
"next": null,
"previous": null,
"add_permission": true,
"results": [
{
"sid": "adgj0a40xb7chmrwBGL",
"name": "New version v5.0 released",
},
...
[
{
# serializer = list
{
"page_size": 10,
"page_number": 1,
"page_count": 2,
"count": 12,
"next": null,
"previous": null,
"add_permission": true,
"results": [
{
"sid": "adgj0a40xb7chmrwBGL",
"name": "New version v5.0 released",
"From": {
"sid": "Labii",
"name": "Labii"
},
"is_read": false,
"change_permission": true
},
...
[
{
# serializer = detail
{
"page_size": 10,
"page_number": 1,
"page_count": 2,
"count": 12,
"next": null,
"previous": null,
"add_permission": true,
"results": [
{
"sid": "ILOR0a40x5dKPUZ50ej",
"parent": null,
"From": {
"sid": "Labii",
"name": "Labii"
},
"name": "Filter digest for My experiments on 2021-03-14",
"body": "",
"rows": [

],
"is_read": true,
"updated_by": null,
"date_updated": "2021-03-14T20:57:37.077810Z",
"date_created": "2021-03-14T20:57:37.073960Z",
"change_permission": true
},
...
[
{

POST Notification List​

Endpoint: /notifications/notification/list/{level}/{sid}/{serializer}/

Create a new notification

Parameter: level (path, string)​

Parameter: sid (path, string)​

Parameter: serializer (path, string)​

Parameter: token (header, string)​

Parameter: to (body, array)​

[{sid:"", name:""}], array of personnel to receive the notification

Parameter: name (body, string)​

Parameter: body (body, string)​

the message of the notification

Parameter: parent (body, object)​

{sid:"", name:""} of a parent notificaiton

Parameter: should_email (body, boolean)​

Should send an email regardless of the user's email settings

Response: 201​

{
"sid": "ILOR0a40x5dKPUZ50ej",
"parent": null,
"From": {
"sid": "Labii",
"name": "Labii"
},
"name": "Filter digest for My experiments on 2021-03-14",
"body": "",
"rows": [

],
"is_read": true,
"updated_by": null,
"date_updated": "2021-03-14T20:57:37.077810Z",
"date_created": "2021-03-14T20:57:37.073960Z",
"change_permission": true
}

Response: 406​

Please select at least one person or team to receive this notification

GET Notification Detail​

Endpoint: /notifications/notification/detail/{sid}/

The view of notification will make this notification is_read=True.

Parameter: sid (path, string)​

Parameter: token (header, string)​

Response: 200​

{
"sid": "ILOR0a40x5dKPUZ50ej",
"parent": null,
"From": {
"sid": "Labii",
"name": "Labii"
},
"name": "Filter digest for My experiments on 2021-03-14",
"body": "",
"rows": [

],
"is_read": true,
"updated_by": null,
"date_updated": "2021-03-14T20:57:37.077810Z",
"date_created": "2021-03-14T20:57:37.073960Z",
"change_permission": true
}

PATCH Notification Detail​

Endpoint: /notifications/notification/detail/{sid}/

Parameter: sid (path, string)​

Parameter: token (header, string)​

Response: 200​

{
"sid": "ILOR0a40x5dKPUZ50ej",
"parent": null,
"From": {
"sid": "Labii",
"name": "Labii"
},
"name": "Filter digest for My experiments on 2021-03-14",
"body": "",
"rows": [

],
"is_read": true,
"updated_by": null,
"date_updated": "2021-03-14T20:57:37.077810Z",
"date_created": "2021-03-14T20:57:37.073960Z",
"change_permission": true
}

DELETE Notification Detail​

Endpoint: /notifications/notification/detail/{sid}/

Parameter: sid (path, string)​

Parameter: token (header, string)​

Response: 200 — If there are other receivers.​

{}

Response: 204 — If you are the only receiver.​

{}