---
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`

## 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.net/openrailassociation/apis/osrd-editoast.md) · [All operations](https://skmtc.net/openrailassociation/apis/osrd-editoast/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openrailassociation/osrd-editoast/revisions/e1fc96bc11fd/schema)
