RESTful Interface Design for Entity Version

Notification Resource

3 min read

On this page
  1. URL: /openempi-ws-rest/1.0/notifications/getNotificationCount
  2. Methods
  3. Responses
  4. Example
  5. URL: /openempi-ws-rest/1.0/notifications
  6. Methods
  7. Responses
  8. Example
  9. URL: /openempi-ws-rest/1.0/notifications/retrieveNotificationsByDate
  10. Methods
  11. Responses
  12. Example
  13. URL(DELETE for remove): /openempi-ws-rest/1.0/notifications
  14. Methods
  15. Responses
  16. Example

URL: /openempi-ws-rest/1.0/notifications/getNotificationCount

Methods

GET

Returns the count of notifications.

Responses

  • 200 - integer - Returns the record count as a single value.

Example

Version 1.0

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/notifications/getNotificationCount

Return:

2

URL: /openempi-ws-rest/1.0/notifications

| Parameter

|

Value Type

|

Parameter Type

|

R/O

|

Description

| | --- | --- | --- | --- | --- | | firstResult | Integer | Query Parameter | O | The number of notifications to skip before the first result notification | | maxResults | Integer | Query Parameter | O | The maximum number of notifications that should be returned | | removeRecords | Boolean | Query Parameter | O | Used to indicate that notifications retrieved will be removed |

Methods

GET

Returns the list of notifications that have been defined in the system.

Responses

  • 200 - application/json - Returns a JSON representation of the response based on the Accept header

  • 200 - application/xml - Returns an XML representation of the response based on the Accept header

Example

Version 1.0

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/notifications

Return:

            2013-10-15T00:00:00-04:00         14                                     John                                     2012-11-09T09:16:52.929-05:00                     NIST2010                     2450                     NIST2010                     NIST2010                     2.16.840.1.113883.3.72.5.9.1                     ISO                                                         d6cf4470-3800-11e3-a301-e069954d612d                                     2012-02-10T13:44:24.755-05:00                     OpenEMPI Domain                     56                     2.16.840.1.113883.4.357                     2.16.840.1.113883.4.357                     2.16.840.1.113883.4.357                     hl7                                                     ADD         JOIN                 2013-10-18T00:00:00-04:00         15                                     John                                     2012-11-09T09:16:52.929-05:00                     NIST2010                     2450                     NIST2010                     NIST2010                     2.16.840.1.113883.3.72.5.9.1                     ISO                                                         d6cf4470-3800-11e3-a301-e069954d612d                                     2012-02-10T13:44:24.755-05:00                     OpenEMPI Domain                     56                     2.16.840.1.113883.4.357                     2.16.840.1.113883.4.357                     2.16.840.1.113883.4.357                     hl7                                                     UPDATE         JOIN    

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/notifications?firstRecord=1&maxRecords=1

Return:

            2013-10-18T00:00:00-04:00         15                                     John                                     2012-11-09T09:16:52.929-05:00                     NIST2010                     2450                     NIST2010                     NIST2010                     2.16.840.1.113883.3.72.5.9.1                     ISO                                                         d6cf4470-3800-11e3-a301-e069954d612d                                     2012-02-10T13:44:24.755-05:00                     OpenEMPI Domain                     56                     2.16.840.1.113883.4.357                     2.16.840.1.113883.4.357                     2.16.840.1.113883.4.357                     hl7                                                     UPDATE         JOIN    

URL: /openempi-ws-rest/1.0/notifications/retrieveNotificationsByDate

Parameter

Value Type

Parameter Type

R/O

Description

dateDateQuery ParameterRThe date is used as search criteria.  The notification  which date is after the date of parameter will be retrieved 
removeRecordsBooleanQuery ParameterOUsed to indicate that notifications retrieved will be removed
endDateDateQuery ParameterOLimits the events retrieved to only those that occurred before the end date (starting with version 3.5.9 and 3.6.2)
sourceStringQuery ParameterOLimits the events retrieved to only those that match the specific source type specified. Valid values for the source event type include 'ADD', 'DELETE','UPDATE','LINK','UNLINK','MERGE','UNMERGE' (starting with version 3.5.9 and 3.6.2)
transitionStringQuery ParameterOLimits the events retrieved to only those that match the specific transition type specified. Valid values for the transition type include 'JOIN' and 'LEAVE' (starting with version 3.5.9 and 3.6.2)

Methods

GET

Returns the list of notifications specified that match the query criteria date provided in the request.

Responses

  • 200 - application/json - Returns a JSON representation of the response based on the Accept header

  • 200 - application/xml - Returns an XML representation of the response based on the Accept header

Example

Version 1.0

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/notifications/retrieveNotificationsByDate?date=2013-10-15

Return:

            2013-10-18T00:00:00-04:00         15                                     John                                     2012-11-09T09:16:52.929-05:00                     NIST2010                     2450                     NIST2010                     NIST2010                     2.16.840.1.113883.3.72.5.9.1                     ISO                                                         d6cf4470-3800-11e3-a301-e069954d612d                                     2012-02-10T13:44:24.755-05:00                     OpenEMPI Domain                     56                     2.16.840.1.113883.4.357                     2.16.840.1.113883.4.357                     2.16.840.1.113883.4.357                     hl7                                                     UPDATE         JOIN    

URL(DELETE for remove): /openempi-ws-rest/1.0/notifications

Delete the notification in the database.

| Parameter

|

Value Type

|

Parameter Type

|

R/O

|

Description

| | --- | --- | --- | --- | --- | | notificationId | Long | Path Parameter | R | The unique identifier of the notification |

Methods

DELETE

Returns no content if delete successfully.

Responses

  • 200 - application/json - Returns a JSON representation of the response based on the Accept header

  • 200 - application/xml - Returns an XML representation of the response based on the Accept header

  • 404 - Returned if cannot find the notification to be deleted by notificationId

  • 409 - Returned if there is some conflict in the system

Example

Version 1.0

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/notifications/14

Return:

No content if delete successfully

Up to Entity API Documentation