- [HTTP request](https://developers.google.com/health/reference/rest/v4beta/users.dataTypes.dataPoints/exportExerciseTcx#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/health/reference/rest/v4beta/users.dataTypes.dataPoints/exportExerciseTcx#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/health/reference/rest/v4beta/users.dataTypes.dataPoints/exportExerciseTcx#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/health/reference/rest/v4beta/users.dataTypes.dataPoints/exportExerciseTcx#body.request_body)
- [Response body](https://developers.google.com/health/reference/rest/v4beta/users.dataTypes.dataPoints/exportExerciseTcx#body.response_body)
  - [JSON representation](https://developers.google.com/health/reference/rest/v4beta/users.dataTypes.dataPoints/exportExerciseTcx#body.ExportExerciseTcxResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/health/reference/rest/v4beta/users.dataTypes.dataPoints/exportExerciseTcx#body.aspect)
- [Examples](https://developers.google.com/health/reference/rest/v4beta/users.dataTypes.dataPoints/exportExerciseTcx#examples)
- [Try it!](https://developers.google.com/health/reference/rest/v4beta/users.dataTypes.dataPoints/exportExerciseTcx#try-it)

Exports exercise data in TCX format.

**IMPORTANT:** HTTP clients must append `?alt=media` to the request URL to download the raw TCX file.

Example: `https://health.googleapis.com/v4/users/me/dataTypes/exercise/dataPoints/EXERCISE_ID:exportExerciseTcx?alt=media`

Without `alt=media`, the server returns a JSON response (`ExportExerciseTcxResponse`) which is intended primarily for gRPC clients.

**Note:** While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the `activity_and_fitness` scopes (`normal` or `readonly`) AND one of the `location` scopes (`normal` or `readonly`) in their access token to succeed.

### HTTP request

`GET https://health.googleapis.com/v4beta/{name=users/*/dataTypes/*/dataPoints/*}:exportExerciseTcx`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax. To know more about valid error responses that can be thrown by this HTTP request, please refer to the [service error catalog](https://developers.google.com/health/reference/rest/v4beta/errors)

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the exercise data point to export. Format: `users/{user}/dataTypes/exercise/dataPoints/{dataPoint}` Example: `users/me/dataTypes/exercise/dataPoints/2026443605080188808` The `{user}` is the alias `"me"` currently. Future versions may support user IDs. The `{dataPoint}` ID maps to the exercise ID, which is a long integer. It takes the form `users/{user}/dataTypes/{datatype}/dataPoints/{datapoint}`. |

### Query parameters

| Parameters ||
|---|---|
| `partialData` | `boolean` Optional. Indicates whether to include the TCX data points when the GPS data is not available. If not specified, defaults to `false` and partial data will not be included. |

### Request body

The request body must be empty.

### Response body

Represents a Response for exporting exercise data in TCX format.

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

| JSON representation |
|---|
| ``` { "tcxData": string } ``` |

| Fields ||
|---|---|
| `tcxData` | `string` Contains the exported TCX data. This field is intended for gRPC clients, as media download integration is not supported for gRPC. HTTP clients should instead use the `alt=media` query parameter to download the raw binary TCX file. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
- `
  https://www.googleapis.com/auth/googlehealth.location.readonly`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).