Notifications

Notification endpoints & methods:

Notification endpoints & methods:

/api/notifications/

  • GET
    - list (default)
  • POST
    - create

/api/notifications/[notification_id]

  • GET
    - show (default)

  • POST
    - update (default)
    - delete

List Notifications

GET /api/notifications?action=list

Returns a JSON formatted array of notification objects.

Required parameters:

  • userkey

Optional parameters: none

Create Notification

POST /api/notifications?action=create

Creates a new notification in the system.

Required parameters:

  • userkey
  • user_id: the id of the user who will recieve the notification

Optional parameters:

  • type: the type of the notification, one of:
    - not
    - alert
  • message: text that will be displayed to the user.
  • click: javascript that will be run when the notification is clicked in the system
  • tooltip: text that will appear when the user's cursor is hovered over the notification in the system.

Show Notification

GET /api/notifications/[notification_id]?action=show

Returns a JSON formatted object representing a single notification.

Required parameters:

  • userkey

Optional parameters: none

Update Notification

POST /api/notifications/[notification_id]?action=update

 

Modifies the details of the specified notification.

Required parameters:

  • userkey

Optional parameters:

  • user_id: the id of the user who will recieve the notification
  • type: the type of the notification, one of:
    - not
    - alert
  • message: text that will be displayed to the user.
  • click: javascript that will be run when the notification is clicked in the system
  • tooltip: text that will appear when the user's cursor is hovered over the notification in the system.

Delete Notification

POST /api/notifications/[notification_id]?action=delete 

Deletes the specified notification.

Required parameters:

  • userkey

Optional parameters: none