---
title: "Request all the KongAir routes"
url: "https://kongair.kong-sales-engineering.com/apis/routes/versions/edadc143-7d75-4546-a85e-7db8b18d9477/operations/get-routes"
---

> Full API specification: https://kongair.kong-sales-engineering.com/apis/routes/versions/edadc143-7d75-4546-a85e-7db8b18d9477.md

# Request all the KongAir routes

`GET` `/routes`

Operation ID: `get-routes`

Returns all the routes KongAir is currently registered to fly. A Route is a pairing between origin and destination airport codes.

## Query parameters

- `origin` (array, optional) - filter by origin

## Responses

- `200` - Successful response with the registered Routes

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Routes Service
  version: 1.0.0
servers:
  - url: https://shared-services.kong-sales-engineering.com/kongair
    description: KongAir API Server
paths:
  /routes:
    get:
      summary: Request all the KongAir routes
      description: |
        Returns all the routes KongAir is currently registered to fly.
        A Route is a pairing between origin and destination airport codes.
      tags:
        - flight-data
      operationId: get-routes
      parameters:
        - name: origin
          in: query
          description: filter by origin
          required: false
          style: form
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: Successful response with the registered Routes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Route"
              examples:
                lhr-sfo:
                  value: |
                    [{
                       "id": "LHR-SFO",
                       "origin": "LHR",
                       "destination": "SFO",
                       "avg_duration": 660
                     }]
security:
  - basicAuth: []
components:
  schemas:
    Route:
      type: object
      properties:
        id:
          type: string
        origin:
          type: string
        destination:
          type: string
        avg_duration:
          type: integer
      required:
        - id
        - origin
        - destination
        - avg_duration
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
```
