Config API Version 2 Notifications

Introduction

Notifications enable users to be notified of information that may be deemed useful to them.

Notifications can be created by users with the correct permissions and viewed by users who match the criteria. When requesting to be notified, context may be supplied so that notifications can be better targeted.

List Notifications

Lists the notifications that can be accessed by the user

Request:

GET /config/v2/organisations/{ORG SPECIFIER}/notifications

URL Path Params

GET Params

Filter Types

The notifications list may be filtered by any of the returned fields, except criteria.

Sort Types

The notifications list may be sorted by any of the returned fields, except criteria.

Group Types

The notifications list may be grouped by any of the returned fields, except criteria.

Response:

HTTP 200 - OK
{"notificationId":"1","title":"Notification title","synopsis":"Synopsis of the notification","url":"http:\/\/www.example.org","startDate":"2013-01-01","endDate":"2013-02-01","orgId":"1","criteria":[[{"field":"igrp","op":"eq","value":"1"}]]}

{"notificationId":"2","title":"Notification title","synopsis":"Synopsis of the notification","url":"http:\/\/www.example.org","startDate":"2013-02-01","endDate":"2013-02-28","orgId":"1","criteria":[]}

Request:

GET /config/v2/organisations/{ORG SPECIFIER}/notifications/{notificationId}

URL Path Params

Response:

HTTP 200 - OK
{"notificationId":"2","title":"Notification title","synopsis":"Synopsis of the notification","url":"http:\/\/www.example.org","startDate":"2013-02-01","endDate":"2013-02-28","orgId":"1","criteria":[]}

Create a Notification

Creates a new notification

Request:

POST /config/v2/organisations/{ORG SPECIFIER}/notifications

URL Path Params

POST Params

Response:

HTTP 201 - CREATED
{"notificationId":"3","title":"Notification title test","synopsis":"Synopsis of the notification","url":"http:\/\/www.example.org","startDate":"2014-01-01","endDate":"2015-02-01","orgId":"1","criteria":[[{"field":"package","op":"eq","value":"standard"}]]}

Acceptable Criteria

There are a number of criteria that can be used to ensure that notifications will only show under certain circumstances. All criteria can be set using the standard logical operators (eq, in, gt, etc.)

The context is determined by the parameters passed when a user is requesting to be notified

Update a Notification

Updates the notification

Request:

POST /config/v2/organisations/{ORG SPECIFIER}/notifications/{notificationId}

URL Path Params

POST Params

Response:

HTTP 204 - NO CONTENT

Request to be notified

Lists all notifications that match the context the user is in

Request:

POST /config/v2/profile/notifications

GET Params

Filter Types

The notifications list may be filtered by any of the returned fields.

Sort Types

The notifications list may be sorted by any of the returned fields.

Response:

HTTP 200 - OK
{"notificationId":"4","title":"Notification title test","synopsis":"Synopsis of the notification","url":"http:\/\/www.example.org","startDate":"2014-01-01","endDate":"2015-02-01","state":"r"}

Request a Single Notification in a Profile

Returns a single notification

Request:

POST /config/v2/profile/notifications/{notificationId}

URL Path Params

Response:

HTTP 200 - OK
{"notificationId":"4","title":"Notification title test","synopsis":"Synopsis of the notification","url":"http:\/\/www.example.org","startDate":"2014-01-01","endDate":"2015-02-01","state":"r"}

Update a Notification in a Profile

Updates a single notification

Request:

POST /config/v2/profile/notifications/{notificationId}

URL Path Params

POST Params

Response:

HTTP 204 - No Content

Fields

Management

User Profile Notification