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).
| Status | Description |
|---|---|
| 200 - OK | Returned if the request was completed successfully. |
| 403 - Forbidden | Returned if the user does not have permission to delete notifications for this user. |
Deletes all notifications for a user (allows immediately clearing of all notifications, both read and unread).
Request Headers
| Key | Value | Description |
|---|---|---|
| Accept | application/json |
Request Parameters
| Key | Value | Description |
|---|---|---|
| {userId} | 3BB1CDC3-2ADB-46C3-B5E3-7A6208A8E10D | Unique identifier of the User |
Response Headers
| Key | Value | Description |
|---|---|---|
| Content-Type | application/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).
| Status | Description |
|---|---|
| 200 - OK | Returned if the request was completed successfully. |
| 403 - Forbidden | Returned if the user does not have permission to view notifications for this user. |
Retrieve the notifications for a user (read and un read) ordered in Date descending order
Request Headers
| Key | Value | Description |
|---|---|---|
| Accept | application/json |
Request Parameters
| Key | Value | Description |
|---|---|---|
| {userId} | f545f3ae-f35c-4677-b516-c5c740f2a8cf | Unique identifier of the User |
Response Headers
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json; charset=utf-8 |
Response Body
{
"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).
| Status | Description |
|---|---|
| 200 - OK | Returned if the request was completed successfully. |
| 403 - Forbidden | Returned if the user does not have permission to create a notification for this user. |
Creates a new notification message for this user
Request Headers
| Key | Value | Description |
|---|---|---|
| Accept | application/json |
Request Parameters
| Key | Value | Description |
|---|---|---|
| {userId} | f545f3ae-f35c-4677-b516-c5c740f2a8cf | Unique identifier of the User |
Request Body
{
"HtmlSummary": "Reminder - <a href=\"http://mywiki/projectx?page=sprint1\" target=\"_blank\">Sprint 1</a> finishes tomorrow!"
}
Response Headers
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json; charset=utf-8 |
Response Body
{
"OccurredAt": "2012-11-11T15:37:23Z",
"Id": "2fba775e-c8f7-468d-9ad2-e9f4f6631130",
"HtmlSummary": "Reminder - <a href=\"http://mywiki/projectx?page=sprint1\" target=\"_blank\">Sprint 1</a> finishes tomorrow!",
"Viewed": false,
"IconClass": "notification-message-icon",
"IconTitle": "Alert",
"Self": "http://localhost/api/user/f545f3ae-f35c-4677-b516-c5c740f2a8cf/notification/2fba775e-c8f7-468d-9ad2-e9f4f6631130"
}
Status Code
201 - Created