- [HTTP request](https://developers.google.com/maps/documentation/navigation/connect/reference/rest/v1/projects.trips/get#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/maps/documentation/navigation/connect/reference/rest/v1/projects.trips/get#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/maps/documentation/navigation/connect/reference/rest/v1/projects.trips/get#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/maps/documentation/navigation/connect/reference/rest/v1/projects.trips/get#body.request_body)
- [Response body](https://developers.google.com/maps/documentation/navigation/connect/reference/rest/v1/projects.trips/get#body.response_body)
- [Authorization scopes](https://developers.google.com/maps/documentation/navigation/connect/reference/rest/v1/projects.trips/get#body.aspect)
- [IAM Permissions](https://developers.google.com/maps/documentation/navigation/connect/reference/rest/v1/projects.trips/get#body.aspect_1)
- [RoutePolylineFormat](https://developers.google.com/maps/documentation/navigation/connect/reference/rest/v1/projects.trips/get#RoutePolylineFormat)
- [Try it!](https://developers.google.com/maps/documentation/navigation/connect/reference/rest/v1/projects.trips/get#try-it)

Gets a trip.

### HTTP request

`GET https://navigationconnect.googleapis.com/v1/{name=projects/*/trips/*}`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the trip to get. Format: projects/{project}/trips/{tripId} |

### Query parameters

| Parameters ||
|---|---|
| `routePolylineFormat` | ``enum (`https://developers.google.com/maps/documentation/navigation/connect/reference/rest/v1/projects.trips/get#RoutePolylineFormat`)`` Optional. The format of the route polyline to return. If not set, `SIMPLE` route polyline will be returned. |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains an instance of `https://developers.google.com/maps/documentation/navigation/connect/reference/rest/v1/projects.trips#Trip`.

### Authorization scopes

Requires the following OAuth scope:

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

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `navigationconnect.trips.get`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## RoutePolylineFormat

Specifies the format of the route polyline.

| Enums ||
|---|---|
| `ROUTE_POLYLINE_FORMAT_UNSPECIFIED` | The route polyline format is unspecified. |
| `SIMPLE` | The route polyline is returned as a simple array of points represented as `google.type.LatLng`. |
| `ENCODED` | The route polyline is returned as an encoded string. See <https://developers.google.com/maps/documentation/utilities/polylinealgorithm>. |
| `S2ENCODED` | The route polyline is encoded as a S2Polyline. See <https://s2geometry.io/devguide/basic_types.html>. |
| `GEO_JSON` | The route polyline is returned as a GeoJSON LineString. See <https://tools.ietf.org/html/rfc7946#section-3.1.4>. |