---
title: "Route segments"
method: GET
path: "/v1/route/{routeName}/segments"
tags: ["routes"]
---

# Route segments

`GET /v1/route/{routeName}/segments`

## Request

- Base URL: `https://api.comma.ai`
- URL: `https://api.comma.ai/v1/route/{routeName}/segments`
- Auth: HTTP bearer

Returns list of segments comprising a route. Authenticated user must have ownership of, or read access to, the device from which the route was uploaded.

## Response `200`

JSON array of segments

- Segment[]
  - `canonical_name` string, required: Contains a dongle ID, timestamp of the beginning of the route, and segment number
  - `number` integer, required: Segment number
  - `canonical_route_name` string, required: Contains a dongle ID and timestamp of the beginning of the route
  - `dongle_id` string, required: A unique 16-character hexadecimal string. Can represent a device or a user.
  - `create_time` integer, required: Unix timestamp at which upload_url was first called for file in segment
  - `start_time_utc_millis` integer, required: Segment start time, milliseconds since epoch
  - `end_time_utc_millis` integer, required: Segment end time, milliseconds since epoch
  - `url` string, required: Signed URL from which route.coords and JPEGs can be downloaded
  - `length` number, required: Sum of distances between GPS points in miles
  - `can` boolean, required: Segment contains CAN messages
  - `hpgps` boolean, required: Segment has ublox packets
  - `radar` boolean, required: Segment contains radar tracks in CAN
  - `devicetype` 3 | 6 | 7, required: Data source - 3 = eon - 6 = comma two - 7 = comma three
  - `proc_log` -1 | 0 | 10 | 20 | 30 | 40 | 50, required: Log file status - -1 = Not received - 0 = Upload URL sent - 10 = Received - 20 = Enqueued - 30 = Processing - 40 = Processed - 50 = Errored
  - `proc_qlog` -1 | 0 | 10 | 20 | 30 | 40 | 50, required: Log file status - -1 = Not received - 0 = Upload URL sent - 10 = Received - 20 = Enqueued - 30 = Processing - 40 = Processed - 50 = Errored
  - `proc_camera` -1 | 0 | 10 | 20 | 30 | 40 | 50, required: Log file status - -1 = Not received - 0 = Upload URL sent - 10 = Received - 20 = Enqueued - 30 = Processing - 40 = Processed - 50 = Errored
  - `proc_dcamera` -1 | 0 | 10 | 20 | 30 | 40 | 50, required: Log file status - -1 = Not received - 0 = Upload URL sent - 10 = Received - 20 = Enqueued - 30 = Processing - 40 = Processed - 50 = Errored
  - `passive` boolean, required: openpilot is running in passive mode
  - `version` string, required: openpilot version
  - `git_commit` string, required: git commit hash
  - `git_branch` string, required: git branch
  - `git_remote` string, required: git remote url
  - `git_dirty` boolean, required: git working tree is dirty

## Changes

- **2022-11-27** `5b1478ce801f`: 1 info
  - api tag `routes` added
- **2022-11-27** `04af598547de`: 1 info
  - the endpoint scheme security `AuthUser` was added to the API

[Operation history](https://skmtc.dev/comma/apis/comma-api/changes/v1/route/:routeName/segments/get.md)

---

[API](https://skmtc.dev/comma/apis/comma-api.md) - [All operations](https://skmtc.dev/comma/apis/comma-api/llms.txt) - [OpenAPI document](https://skmtc.dev/comma/apis/comma-api/revisions/24f7dbc922ad?raw)
