REST API:social notification Resource
From LongJump Support Wiki
Manage Relay notifications using the REST API.
- Learn more: REST API Conventions and Considerations.
Requirements
- Relay must be enabled in Company Information
- To adjust a user's notification settings, see Update a User's Notification Settings
List All Notifications
- Method
- GET
- URI
-
- https://na.longjump.com/networking/rest/social/notification
- https://na.longjump.com/networking/rest/social/notification?new={0|1}
- Query Parameters
- new
- If 0, return all notifications (the default)
- If 1, return only new (unread) notifications
- For more information, see: Specifying Query Parameters in REST APIs
- Response
<platform> <social> <notification> <date_created>2011-05-05T21:21:20.000Z</date_created> <date_modified>2011-05-05T21:21:20.000Z</date_modified> <created_id type="USER" uri="..." displayValue="...name...">...user id...</created_id> <modified_id type="USER" uri="..." displayValue="...name...">...user id...</modified_id> <id>... __??__message or notification id __??__...</id> <type>1</type> <!-- Notification of: Posting (1) or Vote (3) --> <to uri="..." displayValue="...feed name...">...user or group ID...</to> <toType>2</toType> <!-- User (1) or Group (2) --> <feedId>...posting ID...</feedId> <isRead>true</isRead> </notification> </social> <social> <notification> ... </notification> </social> ... <message> <code>0</code> <description>Success</description> </message> <recordCount>N</recordCount> <!-- Number of notifications returned --> </platform>
- See also: REST API:Error Codes
Get a Count of Notifications
- Method
- GET
- URI
- https://na.longjump.com/networking/rest/social/notification/count
- Response
<platform> <message> <code>0</code> <description>Success</description> </message> <recordCount>N</recordCount> <!-- Number of notifications --> </platform>
- See also: REST API:Error Codes
Mark All Notifications as Read
- Method
- PUT
- URI
- https://na.longjump.com/networking/rest/social/notification/setAllRead
- Response
<platform> <message> <code>0</code> <description>Success</description> </message> </platform>
- See also: REST API:Error Codes
Fields
- Note: Unless otherwise indicated, the attribute for a field is "Editable on Add or Update".
Name Type Attribute Required on Add Description Additional Information id String Read Only Record Id type Number notification type - 1 - posting
- 3 - "like" vote
to String Who the notification is for User ID or group ID toType Number When the notification is for a message to a group or to a user - 1 - user
- 2 - group
feedId String Posting that the notification is about For a message, this is the ID of the posting. For vote (e.g. "like"), it is the ID of the vote. isRead Boolean true if the notification has been read. False if it is new. date_modified Date Read Only UTC Format date_created Date Read Only UTC Format created_id Lookup Read Only User ID modified_id Lookup Read Only User ID