https://github.com/folio-org/mod-notify
This documents the API calls that can be made to post notifications for users, and to get them
Notifications from the system to some user
Create a new notify item.
POST /notify
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "A notification to a user",
"additionalProperties": false,
"properties": {
"id": {
"description": "The UUID of this notification",
"type": "string"
},
"recipientId": {
"description": "The UUID of the receiving user",
"type": "string"
},
"senderId": {
"description": "The UUID of the sender",
"type": "string"
},
"text": {
"description": "The text of this notification",
"type": "string"
},
"link": {
"description": "Link to the relevant item for this notification",
"type": "string"
},
"eventConfigName": {
"description": "Unique event config name",
"type": "string"
},
"lang": {
"description": "Notification language",
"type": "string"
},
"context": {
"type": "object",
"description": "Context object"
},
"seen": {
"description": "Whether the user has seen this notification",
"type": "boolean",
"default": false
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate",
"createdByUserId"
]
}
},
"required": [
"text"
]
}
Example:
{
"id": "12345",
"recipientId": "77777777-7777-7777-7777-777777777777",
"text": "The book is now available for you",
"link": "items/23456"
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created notify item
Media type: application/json
Type: any
Example:
{
"id": "12345",
"recipientId": "77777777-7777-7777-7777-777777777777",
"text": "The book is now available for you",
"link": "items/23456"
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
"unable to add notify -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create notify -- unauthorized
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
},
"code": {
"type": "string"
},
"parameters": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Retrieve a list of notify items.
GET /notify
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields: for example link = 1234
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
link=/users/1234
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response
Example:
10
Requested language. Optional. [lang=en]
Returns a list of notify items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Collection of notifications",
"properties": {
"notifications": {
"description": "List of notifications",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A notification to a user",
"additionalProperties": false,
"properties": {
"id": {
"description": "The UUID of this notification",
"type": "string"
},
"recipientId": {
"description": "The UUID of the receiving user",
"type": "string"
},
"senderId": {
"description": "The UUID of the sender",
"type": "string"
},
"text": {
"description": "The text of this notification",
"type": "string"
},
"link": {
"description": "Link to the relevant item for this notification",
"type": "string"
},
"eventConfigName": {
"description": "Unique event config name",
"type": "string"
},
"lang": {
"description": "Notification language",
"type": "string"
},
"context": {
"type": "object",
"description": "Context object"
},
"seen": {
"description": "Whether the user has seen this notification",
"type": "boolean",
"default": false
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate",
"createdByUserId"
]
}
},
"required": [
"text"
]
}
},
"totalRecords": {
"type": "integer"
}
},
"required": [
"notifications",
"totalRecords"
]
}
Example:
{
"notifications": [],
"totalRecords": 0
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
unable to list notify -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list notify -- unauthorized
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
},
"code": {
"type": "string"
},
"parameters": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Send notification to the user by user name
POST /notify/_username/{username}
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "A notification to a user",
"additionalProperties": false,
"properties": {
"id": {
"description": "The UUID of this notification",
"type": "string"
},
"recipientId": {
"description": "The UUID of the receiving user",
"type": "string"
},
"senderId": {
"description": "The UUID of the sender",
"type": "string"
},
"text": {
"description": "The text of this notification",
"type": "string"
},
"link": {
"description": "Link to the relevant item for this notification",
"type": "string"
},
"eventConfigName": {
"description": "Unique event config name",
"type": "string"
},
"lang": {
"description": "Notification language",
"type": "string"
},
"context": {
"type": "object",
"description": "Context object"
},
"seen": {
"description": "Whether the user has seen this notification",
"type": "boolean",
"default": false
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate",
"createdByUserId"
]
}
},
"required": [
"text"
]
}
Example:
{
"id": "12345",
"recipientId": "77777777-7777-7777-7777-777777777777",
"text": "The book is now available for you",
"link": "items/23456"
}
Created
URI to the notification
Okapi trace and timing
Media type: application/json
Bad Request
Media type: text/plain
Type: any
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
},
"code": {
"type": "string"
},
"parameters": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Server Error
Media type: text/plain
Type: any
Retrieve a list of _self items.
GET /notify/user/_self
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields: for example link = 1234
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
link=/users/1234
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response
Example:
10
Requested language. Optional. [lang=en]
Returns a list of _self items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Collection of notifications",
"properties": {
"notifications": {
"description": "List of notifications",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A notification to a user",
"additionalProperties": false,
"properties": {
"id": {
"description": "The UUID of this notification",
"type": "string"
},
"recipientId": {
"description": "The UUID of the receiving user",
"type": "string"
},
"senderId": {
"description": "The UUID of the sender",
"type": "string"
},
"text": {
"description": "The text of this notification",
"type": "string"
},
"link": {
"description": "Link to the relevant item for this notification",
"type": "string"
},
"eventConfigName": {
"description": "Unique event config name",
"type": "string"
},
"lang": {
"description": "Notification language",
"type": "string"
},
"context": {
"type": "object",
"description": "Context object"
},
"seen": {
"description": "Whether the user has seen this notification",
"type": "boolean",
"default": false
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate",
"createdByUserId"
]
}
},
"required": [
"text"
]
}
},
"totalRecords": {
"type": "integer"
}
},
"required": [
"notifications",
"totalRecords"
]
}
Example:
{
"notifications": [],
"totalRecords": 0
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
unable to list _self -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list _self -- unauthorized
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
},
"code": {
"type": "string"
},
"parameters": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
DELETE /notify/user/_self
Delete all seen notifications not modified since this timestamp
Example:
2017-12-25
Requested language. Optional. [lang=en]
No Content
Bad Request
Media type: text/plain
Type: any
Not found
Media type: text/plain
Type: any
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
},
"code": {
"type": "string"
},
"parameters": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Server Error
Media type: text/plain
Type: any
Create a new _self item.
POST /notify/user/_self
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "A notification to a user",
"additionalProperties": false,
"properties": {
"id": {
"description": "The UUID of this notification",
"type": "string"
},
"recipientId": {
"description": "The UUID of the receiving user",
"type": "string"
},
"senderId": {
"description": "The UUID of the sender",
"type": "string"
},
"text": {
"description": "The text of this notification",
"type": "string"
},
"link": {
"description": "Link to the relevant item for this notification",
"type": "string"
},
"eventConfigName": {
"description": "Unique event config name",
"type": "string"
},
"lang": {
"description": "Notification language",
"type": "string"
},
"context": {
"type": "object",
"description": "Context object"
},
"seen": {
"description": "Whether the user has seen this notification",
"type": "boolean",
"default": false
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate",
"createdByUserId"
]
}
},
"required": [
"text"
]
}
Example:
{
"id": "12345",
"recipientId": "77777777-7777-7777-7777-777777777777",
"text": "The book is now available for you",
"link": "items/23456"
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created _self item
Media type: application/json
Type: any
Example:
{
"id": "12345",
"recipientId": "77777777-7777-7777-7777-777777777777",
"text": "The book is now available for you",
"link": "items/23456"
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
"unable to add _self -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create _self -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Update notify item with given {notifyId}
PUT /notify/{id}
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "A notification to a user",
"additionalProperties": false,
"properties": {
"id": {
"description": "The UUID of this notification",
"type": "string"
},
"recipientId": {
"description": "The UUID of the receiving user",
"type": "string"
},
"senderId": {
"description": "The UUID of the sender",
"type": "string"
},
"text": {
"description": "The text of this notification",
"type": "string"
},
"link": {
"description": "Link to the relevant item for this notification",
"type": "string"
},
"eventConfigName": {
"description": "Unique event config name",
"type": "string"
},
"lang": {
"description": "Notification language",
"type": "string"
},
"context": {
"type": "object",
"description": "Context object"
},
"seen": {
"description": "Whether the user has seen this notification",
"type": "boolean",
"default": false
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate",
"createdByUserId"
]
}
},
"required": [
"text"
]
}
Example:
{
"id": "12345",
"recipientId": "77777777-7777-7777-7777-777777777777",
"text": "The book is now available for you",
"link": "items/23456"
}
Item successfully updated
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
"unable to update notify -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"notify not found"
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errors": {
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
},
"code": {
"type": "string"
},
"parameters": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Retrieve notify item with given {notifyId}
GET /notify/{id}
Requested language. Optional. [lang=en]
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "A notification to a user",
"additionalProperties": false,
"properties": {
"id": {
"description": "The UUID of this notification",
"type": "string"
},
"recipientId": {
"description": "The UUID of the receiving user",
"type": "string"
},
"senderId": {
"description": "The UUID of the sender",
"type": "string"
},
"text": {
"description": "The text of this notification",
"type": "string"
},
"link": {
"description": "Link to the relevant item for this notification",
"type": "string"
},
"eventConfigName": {
"description": "Unique event config name",
"type": "string"
},
"lang": {
"description": "Notification language",
"type": "string"
},
"context": {
"type": "object",
"description": "Context object"
},
"seen": {
"description": "Whether the user has seen this notification",
"type": "boolean",
"default": false
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate",
"createdByUserId"
]
}
},
"required": [
"text"
]
}
Example:
{
"id": "12345",
"recipientId": "77777777-7777-7777-7777-777777777777",
"text": "The book is now available for you",
"link": "items/23456"
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"notify not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Delete notify item with given {notifyId}
DELETE /notify/{id}
Requested language. Optional. [lang=en]
Item deleted successfully
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
"unable to delete notify -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"notify not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator