# Method: messages.batchGet

**Full name**: projects.locations.datasets.hl7V2Stores.messages.batchGet

Gets multiple messages in the given HL7v2 store.

### HTTP request

`GET https://healthcare.googleapis.com/v1beta1/{parent=projects/*/locations/*/datasets/*/hl7V2Stores/*}/messages:batchGet`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. Name of the HL7v2 store to retrieve messages from, in the format: `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/hl7v2Stores/{hl7v2_store_id}`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `healthcare.hl7V2Messages.get` |

### Query parameters

| Parameters ||
|---|---|
| `ids[]` | `string` The resource id of the HL7v2 messages to retrieve in the format: `{message_id}`, where the full resource name is `{parent}/messages/{message_id}` A maximum of 100 messages can be retrieved in a batch. All 'ids' have to be under parent. |
| `view` | ``enum(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/MessageView`)`` Specifies the parts of the Messages resource to return in the response. When unspecified, equivalent to BASIC. |

### Request body

The request body must be empty.

### Response body

Gets multiple messages in a specified HL7v2 store.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "messages": [ { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.hl7V2Stores.messages#Message`) } ] } ``` |

| Fields ||
|---|---|
| `messages[]` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.hl7V2Stores.messages#Message`)`` The returned Messages. See `MessageView` for populated fields. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-healthcare`
- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).