Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Resource: Notifications ( /api/user/{userId}/notifications )

Resource representing the collection of notification messages for a user.

This resource supports the following methods: DELETE, GET, POST

Methods

DELETE

...

Clears all notifications for the user

Status Codes

These are the expected status codes returned by the service - in addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

...

Example - Delete all notifications

Deletes all notifications for a user (allows immediately clearing of all notifications, both read and unread).

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{userId}3BB1CDC3-2ADB-46C3-B5E3-7A6208A8E10DUnique identifier of the User

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Status Code

200 - OK

GET

...

Retrieves notification messages for a user.

Status Codes

These are the expected status codes returned by the service - in addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

...

Example - Retrieve notifications for user

Retrieve the notifications for a user (read and un read) ordered in Date descending order

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{userId}f545f3ae-f35c-4677-b516-c5c740f2a8cfUnique identifier of the User

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

Code Block
languagenone
{
  "Skip": 0,
  "Top": 25,
  "Total": 2,
  "Items": [
    {
      "OccurredAt": "2012-11-11T15:38:00Z",
      "Id": "386429b0-5b4f-4422-ac09-a1070122baee",
      "HtmlSummary": "Joe Blogs deleted Requirement 'Weapons must use antimater'",
      "Viewed": true,
      "IconClass": "requirement-icon",
      "IconTitle": "Requirement",
      "Self": "http://localhost/api/user/f545f3ae-f35c-4677-b516-c5c740f2a8cf/notification/386429b0-5b4f-4422-ac09-a1070122baee"
    },
    {
      "OccurredAt": "2012-11-11T15:37:23Z",
      "Id": "71f38117-f39e-48f7-a3d4-7486047ac199",
      "HtmlSummary": "Joe Blogs updated Requirement '<a href=\"http://myserver/EnterpriseTester/home#/requirement/edit/8f5a4b01-ef57-4910-b1a2-a10101632917\">Weapons must use anti-matter</a>'",
      "Viewed": false,
      "IconClass": "requirement-icon",
      "IconTitle": "Requirement",
      "Self": "http://localhost/api/user/f545f3ae-f35c-4677-b516-c5c740f2a8cf/notification/71f38117-f39e-48f7-a3d4-7486047ac199"
    }
  ],
  "UnviewedTotal": 1,
  "Self": "http://localhost/api/api/user/F545F3AE-F35C-4677-B516-C5C740F2A8CF/notifications"
}

Status Code

200 - OK

POST

...

Create a new notification for the user (users can create notifications for themselves without any permissions, otherwise Administrative permissions are required for the organisation)

Required Permissions

  • Administration/Organisation

Status Codes

These are the expected status codes returned by the service - in addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).

...