---
title: "Compute the track ranges through which routes passes."
method: GET
path: "/infra/{infra_id}/routes/track_ranges"
tags: ["infra", "routes"]
---

# Compute the track ranges through which routes passes.

`GET /infra/{infra_id}/routes/track_ranges`

## Request

- Base URL: `https://demo.osrd.fr/api`
- URL: `https://demo.osrd.fr/api/infra/{infra_id}/routes/track_ranges`
- Auth: none declared

## Path parameters

- `infra_id` integer, required

## Query parameters

- `routes` string, required

## Response `200`

Foreach route, either tracks_ranges + switches found on the route, or an error

- union[]
  - union
    - object: RoutePath contains N track ranges with the N-1 switches found in-between, in the order they appear on the route
      - `switches_directions` object[], required
        - `group_id` string, required
        - `switch_id` string, required
      - `track_ranges` DirectionalTrackRange[], required
        - `begin` number, double, required
        - `direction` 'START_TO_STOP' | 'STOP_TO_START', required
        - `end` number, double, required
        - `track` string, required
      - `type` 'Computed', required
    - object
      - `type` 'NotFound', required
    - object
      - `type` 'CantComputePath', required

---

[API](https://skmtc.dev/openrailassociation/apis/osrd-editoast.md) - [All operations](https://skmtc.dev/openrailassociation/apis/osrd-editoast/llms.txt) - [OpenAPI document](https://skmtc.dev/openrailassociation/apis/osrd-editoast/revisions/7c72c5e1bc0e?raw)
