User notifications API
11.27 This API allows you to retrieve notifications from a user (usermention) or to send them to
End point
The main end point URL is /api/rest/usernotif
(alias /api/rest/usermention
)
Count unread notifications
Use this end point to find out the number of unread messages, and time since unread:
GET /api/rest/usernotif/unread
(or GET /api/rest/usernotif/count
)
Parameters
query: a query (see Request Language ) to select messages
you cannot retrieve any messages other than those of the surfer invoking the service. By default, the query is the base query used by the UserMention service (pactivated='1'
).orderby: order by clause
level: additional filter by level (multi-valued)
source: additional filter by source (multi-valued)
type: additional filter by type (multi-valued)
Get notification messages (Infinite list)
To get unread messages, use this end point:
GET /api/rest/usernotif
Parameters
withData: boolean (default is true). If false, get the same result as
GET /api/rest/usernotif/unread
max: maximum number of messages (default is 50, max is 200, use after to get the following messages)
after: the last message token after which you want to retrieve messages
query: a query (see Request Language ) to select messages
you cannot retrieve any messages other than those of the surfer invoking the service. By default, the query is the base query used by the UserMention service (pactivated='1'
).orderby: order by clause
level: additional filter by level (multi-valued)
source: additional filter by source (multi-valued)
type: additional filter by type (multi-valued)
Get notification messages (Paginated list)
To get unread messages, use this end point:
GET /api/rest/usernotif/list
Parameters
withData: boolean (default is true). If false, get the same result as
GET /api/rest/usernotif/unread
max: maximum number of messages (default is 50, max is 200, use from to get the following page of messages)
from: the position (1 to total) of the first message you want to get
query: a query (see Request Language ) to select messages
you cannot retrieve any messages other than those of the surfer invoking the service. By default, the query is the base query used by the UserMention service (pactivated='1'
).orderby: order by clause
level: additional filter by level (multi-valued)
source: additional filter by source (multi-valued)
type: additional filter by type (multi-valued)
Get message
To get a given message, use this end point:
GET /api/rest/usernotif/{id}
Parameters
id (path parameter, mandatory): key or uuid of message
Mark read
To mark messages read, use this end point (this mark read all messages until now):
POST /api/rest/usernotif/markread
Parameters
type: types (multi-valued)
Additional parameters
Availables for get single message or list.
i18n: default true, localization
raw: default inverse of i18n value, if raw is true, exported data aren’t localized
i18nQuery: default i18n value, localize only query
i18nSort: default i18n value, localize only sort
lang: language if different than surfer language
Headers
Coming soon…
Send notification
Coming soon…
API Notifications
Configuration
…
Â