Stay organized with collections
Save and categorize content based on your preferences.
Full name: projects.locations.datasets.hl7V2Stores.messages.list
Lists all the messages in the given HL7v2 store with support for filtering.
Note: HL7v2 messages are indexed asynchronously, so there might be a slight delay between the time a message is created and when it can be found through a filter.
HTTP request
GET https://healthcare.googleapis.com/v1/{parent=projects/*/locations/*/datasets/*/hl7V2Stores/*}/messages
Required. Name of the HL7v2 store to retrieve messages from.
Authorization requires the following IAM permission on the specified resource parent:
healthcare.hl7V2Messages.list
Query parameters
Parameters
pageSize
integer
Limit on the number of messages to return in a single response. If not specified, 100 is used. May not be larger than 1000.
pageToken
string
The nextPageToken value returned from the previous List request, if any.
filter
string
Restricts messages returned to those matching a filter. The following syntax is available:
A string field value can be written as text inside quotation marks, for example "query text". The only valid relational operation for text fields is equality(=), where text is searched within the field, rather than having the field be equal to the text. For example, "Comment = great" returns messages with great in the comment field.
A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator(=), along with the less than/greater than operators(<, <=, >, >=). Note that there is no inequality (!=) operator. You can prepend the NOT operator to an expression to negate it.
A date field value must be written in yyyy-mm-dd form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator(=) , along with the less than/greater than operators(<, <=, >, >=). Note that there is no inequality(!=) operator. You can prepend the NOT operator to an expression to negate it.
Multiple field query expressions can be combined in one query by adding AND or OR operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the NOT operator to an expression to negate it.
Fields/functions available for filtering are:
messageType, from the MSH-9.1 field. For example, NOT messageType = "ADT".
send_date or sendDate, the YYYY-MM-DD date the message was sent in the dataset's timeZone, from the MSH-7 segment. For example, send_date < "2017-01-02".
sendTime, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, sendTime < "2017-01-02T00:00:00-05:00".
createTime, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, createTime < "2017-01-02T00:00:00-05:00".
sendFacility, the care center that the message came from, from the MSH-4 segment. For example, sendFacility = "ABC".
PatientId(value, type), which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, PatientId("123456", "MRN").
labels.x, a string value of the label with key x as set using the Message.labels map. For example, labels."priority"="high". The operator :* can be used to assert the existence of a label. For example, labels."priority":*.
Specifies the parts of the Message to return in the response. When unspecified, equivalent to BASIC. Setting this to anything other than BASIC with a pageSize larger than the default can generate a large response, which impacts the performance of this method.
Request body
The request body must be empty.
Response body
Lists the messages in the specified HL7v2 store.
If successful, the response body contains data with the following structure:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-27 UTC."],[[["\u003cp\u003eThis API endpoint \u003ccode\u003eprojects.locations.datasets.hl7V2Stores.messages.list\u003c/code\u003e is used to list all messages within a specified HL7v2 store, supporting filter operations to refine the results.\u003c/p\u003e\n"],["\u003cp\u003eMessages are indexed asynchronously, meaning there may be a slight delay before a newly created message can be found via filters, and the required IAM permission for this is \u003ccode\u003ehealthcare.hl7V2Messages.list\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe number of messages returned can be controlled using the \u003ccode\u003epageSize\u003c/code\u003e query parameter (defaulting to 100, maximum 1000), and navigation through results is done with the \u003ccode\u003enextPageToken\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eFiltering messages is possible through the \u003ccode\u003efilter\u003c/code\u003e parameter using string, number, and date comparisons, combined with \u003ccode\u003eAND\u003c/code\u003e, \u003ccode\u003eOR\u003c/code\u003e, and \u003ccode\u003eNOT\u003c/code\u003e operators, and also supports filtering by various fields like \u003ccode\u003emessageType\u003c/code\u003e, \u003ccode\u003esend_date\u003c/code\u003e, and \u003ccode\u003ePatientId\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eResults can be sorted using the \u003ccode\u003eorderBy\u003c/code\u003e parameter, limited to the \u003ccode\u003esendTime\u003c/code\u003e field, and the \u003ccode\u003eview\u003c/code\u003e parameter allows to customize the fields returned for each message.\u003c/p\u003e\n"]]],[],null,[]]