Resource: Notification ( /api/user/{userId}/notification/{notificationId} )

Resource representing a single notification message for a user.

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

Methods

DELETE


Deletes a single notification message

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).

StatusDescription
200 - OKReturned if the request was completed successfully.
403 - ForbiddenReturned if the user does not have permission to delete notifications for this user.
404 - NotFoundReturned if notification message was not found.

Example - Delete a notification message

Removes a notification from the users collection of in-app notifications

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{userId}32B00F17-D492-4DAD-AD6A-DEBD61EFA119ID of the user whose in-box the notification belongs to.
{notificationId}2E2A2B7F-EEEA-4649-8F34-4A841426F27BID of the notification message

Response Headers

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

Status Code

200 - OK

GET


Retrieves information about a single notification message.

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).

StatusDescription
200 - OKReturned if the request was completed successfully.
403 - ForbiddenReturned if the user does not have permission to view notifications for this user.
404 - NotFoundReturned if notification message was not found.

Example - Get individual notification

Retrieves a notification identified by it's user and notification identifier

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{userId}32B00F17-D492-4DAD-AD6A-DEBD61EFA119ID of the user whose in-box the notification belongs to.
{notificationId}2E2A2B7F-EEEA-4649-8F34-4A841426F27BID of the notification message

Response Headers

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

Response Body

{
  "OccurredAt": "2012-01-01T14:04:05Z",
  "Id": "2e2a2b7f-eeea-4649-8f34-4a841426f27b",
  "HtmlSummary": "Joe Bloggs has created requirement 'All close buttons should be red'",
  "Viewed": false,
  "IconClass": "requirement-icon",
  "IconTitle": "Requirement",
  "Self": "http://localhost/api/user/32b00f17-d492-4dad-ad6a-debd61efa119/notification/2e2a2b7f-eeea-4649-8f34-4a841426f27b"
}

Status Code

200 - OK

PATCH


Patch an existing notification message (Allows updating the Viewed property)

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).

StatusDescription
200 - OKReturned if the request was completed successfully.
403 - ForbiddenReturned if you do not have permission to mark this notification message as being viewed.

Example - Patch notification's 'Viewed' property

Marks the notification as having been viewed by the user (will cause message to be displayed in grey color within the in-app notifications inbox)

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{userId}32B00F17-D492-4DAD-AD6A-DEBD61EFA119ID of the user whose in-box the notification belongs to.
{notificationId}2E2A2B7F-EEEA-4649-8F34-4A841426F27BID of the notification message

Request Body

{
  "Viewed": true
}

Response Headers

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

Response Body

{
  "OccurredAt": "2012-01-01T14:04:05Z",
  "Id": "2e2a2b7f-eeea-4649-8f34-4a841426f27b",
  "HtmlSummary": "Joe Bloggs has created requirement 'All close buttons should be red'",
  "Viewed": true,
  "IconClass": "requirement-icon",
  "IconTitle": "Requirement",
  "Self": "http://localhost/api/user/32b00f17-d492-4dad-ad6a-debd61efa119/notification/2e2a2b7f-eeea-4649-8f34-4a841426f27b"
}

Status Code

200 - OK

  • No labels