The REST API provides the following methods to retrieve various parts of a message:

The message retrieval REST API methods expose Protected Health Information (PHI) data. It is the responsibility of the Rhapsody administrator to ensure that access rights for these methods are granted to the appropriate users. It is the responsibility of the users to ensure these methods are implemented securely when dealing with PHI.

GET /api/message/<id>/meta

URI

GET /api/message/<id>/meta

Description

Retrieves the message metadata for a specified message (primarily, but not exclusively, the message properties).

Request Header

Accept: application/json, text/html

Accept: application/vnd.orchestral.rhapsody.6_0+json

Request Body

Empty.

Response Status 200 OK - operation successful.

Response Body

The response body has the following data object structure:

    • rootMessageIdentifier - [str] the identifier of the original input message.
    • messageIdentifier - [str] the identifier of this message.
    • properties - [array] of properties:
      • name - [str] representing name of property.
      • value - [str] representing value of property.
    • inputTime - [str] date-time in ISO8601 format.
    • bodyEncoding - [str] the Java encoding name of the message body or null if not explicitly set.
    • errors- [array] of errors:
      • errorCode - [str] the error code (not always be present as custom filters may not provide them).
      • errorMessage - [str] the error translated either using the requester's locale or if not available, the Rhapsody locale.

Currently, the method returns null (indicating the default system encoding) if no character encoding has been explicitly set.

Example

Access Rights

'View message metadata REST API'.
'View message properties' (on the message's locker).

GET /api/message/<id>/path

URI

GET /api/message/<id>/path

Description

Retrieves the message path for a specified message and all the events associated with the message.

Request Header

Accept: application/json, text/html

Accept: application/vnd.orchestral.rhapsody.6_0+json

Request Body

Empty.

Response Status 200 OK - operation successful.

Response Body

A tree structure of path objects with the root path objects returned at the data object level:

    • messageIdentifier - [str] identifier of this message.
    • onPath - [bool] true if this particular path element is followed to reach the identifier of the requested message. Used by the Management Console to highlight the active path.
    • componentInfo - [object] of component information:
      • name - [str] component name.
      • id - [int] component identifier.
      • folderPath - [str] component folder path.
    • children - [array] of these path elements.
    • events - [array] of events pertaining to this specific path element:
      • timestamp - [str] date-time in ISO8601 format.
      • eventType - [enumerated str] containing enumerated value of the possible event types.
      • description - [str] describing the event and possibly its parameters, translated using either the requester's locale or if not available, the Rhapsody locale.
      • parameters- [array] of parameters:
        • type - [str] containing an enumerated value of the following optional parameter types:
          • PROCESSING_TIME - [int] transmitted as a number in nanoseconds.
          • STRING - translated using the requester's locale if available, or otherwise the Rhapsody locale.
          • EXCEPTION - translated exception message.
          • MESSAGE_IDENTIFIER - transmitted as a string
          • COMPONENT_IDENTIFIER - transmitted as componentInfo containing the component name, identifier and folder path.
          • LIST_OF_STRINGS - transmitted as a array containing translated strings
          • LIST_OF_MESSAGE_IDENTIFIERS - transmitted as an array of strings
          • LIST_OF_ERRORS - array of error objects:
            • errorCode - [str] the error code (optional).
            • errorMessage - translated error message.
        • value - the value type depends on the parameter type.
Example


Access Rights

'View message metadata REST API'.
'View message properties' (on the message's locker).

GET /api/message/<id>/body

URI

GET /api/message/<id>/body

Description

Retrieves the message body for the specified message. The message itself is returned as binary, but a parameter on the response Content-Type indicates the character encoding associated with the message body if this has been explicitly set in Rhapsody. No character encoding information is returned if this has never been explicitly set within Rhapsody.

If you attempt to retrieve a message body that was stored in the Secondary Body Store and deleted, then you will encounter the HTTP error 410 Gone. Refer to Message Store for details on the Secondary Body Store.

Request Header

Accept: application/octet-stream

Accept: application/vnd.orchestral.rhapsody.6_0+octet-stream

Request Body

Empty.

Response Status 200 OK - operation successful.

Response Body

If the body is requested as application/octet-stream, then the Content-Disposition header is set to an appropriate filename for the message using the Filename message property, or if not present, the message identifier.

Example

Currently, the method returns the default system encoding if no character encoding has been explicitly set.

Access Rights

'View message body REST API'.
'View message bodies (on the message's locker).

GET /api/message/<id>

URI

GET /api/message/<id>

Description

Retrieves a multi-part response containing both the message metadata and body for a specified message. Access Rights govern whether the message metadata or body or both are returned.

If you attempt to retrieve a message whose body was stored in the Secondary Body Store and deleted, then the message body is not returned. Refer to Message Store for details on the Secondary Body Store.

Request Header

Accept: multipart/mixed

Accept: multipart/vnd.orchestral.rhapsody.6_0+mixed

Request Body

Empty.

Response Status 200 OK - operation successful.

Response Body

Up to three MIME body parts are included in a valid multi-part response:

Content-X-Rhapsody-Messagepart - inline with a filename of meta.
Content-Type - application/json.
Refer to GET /api/message/<id>/meta for details on the response body structure.

Content-X-Rhapsody-Messagepart - inline with a filename of path.
Content-Type - application/json.
Refer to GET /api/message/<id>/path for details on the response body structure.

Content-X-Rhapsody-Messagepart - body.
Content-Type - application/octet-stream (with a character set parameter if the character encoding has been explicitly set).
Content-Disposition - attachment with a filename as described in GET /api/message/<id>/body.
Refer to GET /api/message/<id>/body for details on the response body structure.

Example

Access Rights

'View message metadata REST API' (for the metadata and path).
'View message body REST API' (for the message body).
'View message properties' (on the message's locker, for the metadata and path).
'View message bodies' (on the message's locker, for the message body).

POST /api/message

URI

POST /api/message

Description

Retrieves a number of messages in a single request using a list of message identifiers.

If you attempt to retrieve a message whose body was stored in the Secondary Body Store and deleted, then the message body is not returned. Refer to Message Store for details on the Secondary Body Store.

The maximum number of messages you can retrieve is 1000. If you attempt to retrieve more than 1000 messages, you will encounter an error response.

Request Header

Accept: multipart/mixed
Content-type: application/json

Accept: multipart/vnd.orchestral.rhapsody.6_0+mixed
Content-type: application/vnd.orchestral.rhapsody.6_0+json

Request Body

An array of strings which are message identifiers, for example:

{"messageIdentifiers":["1.8064.31","1.3712.14"]}
Response Status 200 OK - operation successful.

Response Body

A MIME multi-part response which is equivalent to calling GET /api/message/<id> for each requested message. A response body is returned even if only some of the messages are found (an error is returned if no messages are requested, or none are found, or if any message identifiers are syntactically invalid).

Example
--Boundary_3_561221000_1350951799938
Content-Type: multipart/mixed; boundary=Boundary_1_2079557031_1350951799923

--Boundary_1_2079557031_1350951799923
Content-X-Rhapsody-Messagepart: meta
Content-Type: application/json

{"properties":{"InputTime":"1350951541245","id":"30","rhapsody:BodyEncoding":"windows\u002D1252","rhapsody:InputCommunicationPoint":"Message\u0020Source\u0020\u002810\u0020messages\u0029","rhapsody:InputCommunicationPointId":"137"},"errors":[],"bodyEncoding":"windows\u002D1252","messageIdentifier":"1\u002E8064\u002E31","rootMessageIdentifier":"1\u002E8064\u002E31","inputTime":"20121023T131901\u002E245\u002B1300"}
--Boundary_1_2079557031_1350951799923
Content-X-Rhapsody-Messagepart: path
Content-Type: application/json

{"children":[{"children":[{"children":[],"events":[{"timestamp":"20121023T131902\u002E007\u002B1300","parameters":[],"description":"Delivered\u0020to\u0020communication\u0020point","eventType":"DELIVERED\u005FTO\u005FCOMMUNICATION\u005FPOINT"},{"timestamp":"20121023T131902\u002E546\u002B1300","parameters":[{"value":1301,"type":"PROCESSING\u005FTIME"}],"description":"Sent\u0020by\u0020communication\u0020point\u002C\u0020total\u0020processing\u0020took\u00201\u002E301\u0020seconds\u002E","eventType":"SENT\u005FBY\u005FCOMMUNICATION\u005FPOINT"}],"componentInfo":{"name":"W\u0020\u002D\u0020\u0028D\u0029\u0020\u002D\u0020\u0028ReS\u0020\u002D\u0020ReO\u0029\u0020\u002D\u0020A","id":133,"folderPath":"RLC\u002FNotifications\u002FWorsening\u0020Alert\u0020Level\u002FWarning\u0020\u002D\u0020Alarm\u002FWarning\u0020\u002D\u0020\u0028Dismissed\u0029\u0020\u002D\u0020\u0028Resolved\u0020Automatically\u0020\u002D\u0020Reopened\u0020Automatically\u0029\u0020\u002D\u0020Alarm\u002FDo\u0020not\u0020start"},"messageIdentifier":"1\u002E8064\u002E175","onPath":false}],"events":[{"timestamp":"20121023T131902\u002E004\u002B1300","parameters":[],"description":"Placed\u0020on\u0020route","eventType":"PLACED\u005FON\u005FROUTE"}],"componentInfo":{"name":"NewRoute","id":199,"folderPath":"RLC\u002FNotifications\u002FWorsening\u0020Alert\u0020Level\u002FWarning\u0020\u002D\u0020Alarm\u002FWarning\u0020\u002D\u0020\u0028Dismissed\u0029\u0020\u002D\u0020\u0028Resolved\u0020Automatically\u0020\u002D\u0020Reopened\u0020Automatically\u0029\u0020\u002D\u0020Alarm\u002FStart\u0020\u002D\u002010\u0020messages\u0020\u0028Warning\u0029"},"messageIdentifier":"1\u002E8064\u002E174","onPath":false}],"events":[{"timestamp":"20121023T131901\u002E245\u002B1300","parameters":[],"description":"Received\u0020by\u0020communication\u0020point","eventType":"RECEIVED"}],"componentInfo":{"name":"Message\u0020Source\u0020\u002810\u0020messages\u0029","id":137,"folderPath":"RLC\u002FNotifications\u002FWorsening\u0020Alert\u0020Level\u002FWarning\u0020\u002D\u0020Alarm\u002FWarning\u0020\u002D\u0020\u0028Dismissed\u0029\u0020\u002D\u0020\u0028Resolved\u0020Automatically\u0020\u002D\u0020Reopened\u0020Automatically\u0029\u0020\u002D\u0020Alarm\u002FStart\u0020\u002D\u002010\u0020messages\u0020\u0028Warning\u0029"},"messageIdentifier":"1\u002E8064\u002E31","onPath":true}
--Boundary_1_2079557031_1350951799923
Content-Disposition: attachment;filename=1.8064.31;charset=windows-1252
Content-X-Rhapsody-Messagepart: body
Content-Type: application/octet-stream

MSH|^~\&|BAXP|001|BAXP|001|20020502145546||ADT^A01|69495|P|2.2|||AL|NE
EVN|A01|20020502145519
PID|0001||2528083|000353883|DUNN^BOY BABY^^^||20020502|M||C|14415 BROOK DRIVE^^WOODBRIDGE^VA^22193-0000^USA^^001|001|(703)680-3330|||S|NP|2528083^^^|||2527821||VA
PV1|0001|I|NN^0190^C|NB|||00889^KEFALE, GEORGIS|00889^KEFALE, GEORGIS||NBN||||N||N|00889^KEFALE, GEORGIS|I||D||||||||||||||||||||||||200205021451
OBX|0001|ST|^ADMIT DIAGNOSIS TEXT||NORMAL NEWBORN
OBX|0002|ST|1010.1^WEIGHT(KG)^AS4
OBX|0003|ST|1010.3^HEIGHT(CM)^AS4

--Boundary_1_2079557031_1350951799923--

--Boundary_3_561221000_1350951799938
Content-Type: multipart/mixed; boundary=Boundary_2_1182032819_1350951799936

--Boundary_2_1182032819_1350951799936
Content-X-Rhapsody-Messagepart: meta
Content-Type: application/json

{"properties":{"InputTime":"1350951541143","id":"13","rhapsody:BodyEncoding":"windows\u002D1252","rhapsody:InputCommunicationPoint":"Message\u0020Source\u0020\u002810\u0020messages\u0029","rhapsody:InputCommunicationPointId":"137"},"errors":[],"bodyEncoding":"windows\u002D1252","messageIdentifier":"1\u002E3712\u002E14","rootMessageIdentifier":"1\u002E3712\u002E14","inputTime":"20121023T131901\u002E143\u002B1300"}
--Boundary_2_1182032819_1350951799936
Content-X-Rhapsody-Messagepart: path
Content-Type: application/json

{"children":[{"children":[{"children":[],"events":[{"timestamp":"20121023T131901\u002E992\u002B1300","parameters":[],"description":"Delivered\u0020to\u0020communication\u0020point","eventType":"DELIVERED\u005FTO\u005FCOMMUNICATION\u005FPOINT"},{"timestamp":"20121023T131902\u002E541\u002B1300","parameters":[{"value":1398,"type":"PROCESSING\u005FTIME"}],"description":"Sent\u0020by\u0020communication\u0020point\u002C\u0020total\u0020processing\u0020took\u00201\u002E398\u0020seconds\u002E","eventType":"SENT\u005FBY\u005FCOMMUNICATION\u005FPOINT"}],"componentInfo":{"name":"W\u0020\u002D\u0020\u0028D\u0029\u0020\u002D\u0020\u0028ReS\u0020\u002D\u0020ReO\u0029\u0020\u002D\u0020A","id":133,"folderPath":"RLC\u002FNotifications\u002FWorsening\u0020Alert\u0020Level\u002FWarning\u0020\u002D\u0020Alarm\u002FWarning\u0020\u002D\u0020\u0028Dismissed\u0029\u0020\u002D\u0020\u0028Resolved\u0020Automatically\u0020\u002D\u0020Reopened\u0020Automatically\u0029\u0020\u002D\u0020Alarm\u002FDo\u0020not\u0020start"},"messageIdentifier":"1\u002E3712\u002E136","onPath":false}],"events":[{"timestamp":"20121023T131901\u002E992\u002B1300","parameters":[],"description":"Placed\u0020on\u0020route","eventType":"PLACED\u005FON\u005FROUTE"}],"componentInfo":{"name":"NewRoute","id":199,"folderPath":"RLC\u002FNotifications\u002FWorsening\u0020Alert\u0020Level\u002FWarning\u0020\u002D\u0020Alarm\u002FWarning\u0020\u002D\u0020\u0028Dismissed\u0029\u0020\u002D\u0020\u0028Resolved\u0020Automatically\u0020\u002D\u0020Reopened\u0020Automatically\u0029\u0020\u002D\u0020Alarm\u002FStart\u0020\u002D\u002010\u0020messages\u0020\u0028Warning\u0029"},"messageIdentifier":"1\u002E3712\u002E135","onPath":false}],"events":[{"timestamp":"20121023T131901\u002E153\u002B1300","parameters":[],"description":"Received\u0020by\u0020communication\u0020point","eventType":"RECEIVED"}],"componentInfo":{"name":"Message\u0020Source\u0020\u002810\u0020messages\u0029","id":137,"folderPath":"RLC\u002FNotifications\u002FWorsening\u0020Alert\u0020Level\u002FWarning\u0020\u002D\u0020Alarm\u002FWarning\u0020\u002D\u0020\u0028Dismissed\u0029\u0020\u002D\u0020\u0028Resolved\u0020Automatically\u0020\u002D\u0020Reopened\u0020Automatically\u0029\u0020\u002D\u0020Alarm\u002FStart\u0020\u002D\u002010\u0020messages\u0020\u0028Warning\u0029"},"messageIdentifier":"1\u002E3712\u002E14","onPath":true}
--Boundary_2_1182032819_1350951799936
Content-Disposition: attachment;filename=1.3712.14;charset=windows-1252
Content-X-Rhapsody-Messagepart: body
Content-Type: application/octet-stream

MSH|^~\&|BAXP|001|BAXP|001|20020502145546||ADT^A01|69495|P|2.2|||AL|NE
EVN|A01|20020502145519
PID|0001||2528083|000353883|DUNN^BOY BABY^^^||20020502|M||C|14415 BROOK DRIVE^^WOODBRIDGE^VA^22193-0000^USA^^001|001|(703)680-3330|||S|NP|2528083^^^|||2527821||VA
PV1|0001|I|NN^0190^C|NB|||00889^KEFALE, GEORGIS|00889^KEFALE, GEORGIS||NBN||||N||N|00889^KEFALE, GEORGIS|I||D||||||||||||||||||||||||200205021451
OBX|0001|ST|^ADMIT DIAGNOSIS TEXT||NORMAL NEWBORN
OBX|0002|ST|1010.1^WEIGHT(KG)^AS4
OBX|0003|ST|1010.3^HEIGHT(CM)^AS4

--Boundary_2_1182032819_1350951799936--

--Boundary_3_561221000_1350951799938--

Access Rights

'View message metadata REST API'.
'View message body REST API'.
'View message properties' (on the message's locker).
'View message bodies' (on the message's locker).

DELETE /api/message/<id>

URI

DELETE /api/message/<id>

Description

Deletes the current message from the Error Queue or Hold Queue.

Request Header

Content-Type: application/json
CSRF Protection Enabled

Content-Type: application/vnd.orchestral.rhapsody.6_1+json
CSRF Protection Enabled

Request Body

 {"messageTable":"ERROR"}

Response Status

204 No Content - operation successful .

Response Body Empty.

Access Rights

'Delete message REST API'.
'Delete held/errored messages' (on the message's locker).

PUT /api/message/<id>

URI

PUT /api/message/<id>

Description

Releases the current message from the Error Queue or Hold Queue.

Request Header

Content-Type: application/json
CSRF Protection Enabled

Content-Type: application/vnd.orchestral.rhapsody.6_1+json
CSRF Protection Enabled

Request Body

 {"messageTable":"ERROR"}

Response Status

204 No Content - operation successful.

Response Body Empty.

Access Rights

'Release message REST API'.
'Release/reprocess messages' (on the message's locker).