Notification

Notification

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

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.

404 - NotFound

Returned if notification message was not found.

 

Example - Delete a notification message

 

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

Request Headers

Key

Value

Description

Accept

application/json

 

Request Parameters

Key

Value

Description

{userId}

32B00F17-D492-4DAD-AD6A-DEBD61EFA119

ID of the user whose in-box the notification belongs to.

{notificationId}

2E2A2B7F-EEEA-4649-8F34-4A841426F27B

ID of the notification message

Response Headers

Key

Value

Description

Content-Type

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

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.

404 - NotFound

Returned if notification message was not found.

 

Example - Get individual notification

 

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

Request Headers

Key

Value

Description

Accept

application/json

 

Request Parameters

Key

Value

Description

{userId}

32B00F17-D492-4DAD-AD6A-DEBD61EFA119

ID of the user whose in-box the notification belongs to.

{notificationId}

2E2A2B7F-EEEA-4649-8F34-4A841426F27B

ID of the notification message

Response Headers

Key

Value

Description

Content-Type

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

Status

Description

200 - OK

Returned if the request was completed successfully.

403 - Forbidden

Returned 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

Key

Value

Description

Accept

application/json

 

Request Parameters

Key

Value

Description

{userId}

32B00F17-D492-4DAD-AD6A-DEBD61EFA119

ID of the user whose in-box the notification belongs to.

{notificationId}

2E2A2B7F-EEEA-4649-8F34-4A841426F27B

ID of the notification message

Request Body

{ "Viewed": true }

Response Headers

Key

Value

Description

Content-Type

application/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