---
title: "List all routes associated with a service"
url: "https://nov18-dev.movespot.fyi/apis/konnect-runtime-groups-configuration-0/versions/af18902c-58f1-49d7-8ec2-9987b4e0d1bd/operations/list-routes-for-service"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-runtime-groups-configuration-0/versions/af18902c-58f1-49d7-8ec2-9987b4e0d1bd.md

# List all routes associated with a service

`GET` `/runtime-groups/{runtimeGroupId}/core-entities/services/{service_id}/routes`

Operation ID: `list-routes-for-service`

List all routes associated with a a service

## Path parameters

- `runtimeGroupId` (string, required) - The ID of your runtime group. This variable is available in the Konnect manager
- `service_id` (string, required) - ID or name of the related service

## Query parameters

- `size` (integer, optional) - Number of resources to be returned.
- `offset` (string, optional) - Offset from which to return the next set of resources. Use the value of the 'offset' field from the response of a list operation as input here to paginate through all the resources
- `tags` (string, optional) - A list of tags to filter the list of resources on. Multiple tags can be concatenated using ',' to mean AND or using '/' to mean OR.

## Responses

- `200` - A successful response listing routes

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Konnect Runtime Groups Configuration
  version: 0.0.1
servers:
  - url: https://us.api.konghq.com/v2
    description: United-States Production region
  - url: https://eu.api.konghq.com/v2
    description: Europe Production region
  - url: https://au.api.konghq.com/v2
    description: Australia Production region
  - url: https://me.api.konghq.com/v2
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v2
    description: India Production region
  - url: https://sg.api.konghq.com/v2
    description: Singapore Production region
paths:
  /runtime-groups/{runtimeGroupId}/core-entities/services/{service_id}/routes:
    parameters:
      - $ref: "#/components/parameters/service_id"
      - $ref: "#/components/parameters/runtimeGroupId"
    get:
      operationId: list-routes-for-service
      summary: List all routes associated with a service
      description: List all routes associated with a a service
      parameters:
        - name: service_id
          in: path
          description: ID or name of the related service
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/pagination-size"
        - $ref: "#/components/parameters/pagination-offset"
        - $ref: "#/components/parameters/pagination-tags-filter"
      responses:
        "200":
          description: A successful response listing routes
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Route"
                  offset:
                    $ref: "#/components/schemas/pagination-offset-response"
              examples:
                Example 1:
                  value:
                    data:
                      - hosts:
                          - foo.example.com
                          - foo.example.us
                        id: 56c4566c-14cc-4132-9011-4139fcbbe50a
                        name: example-route
                        paths:
                          - /v1
                          - /v2
                        service:
                          id: bd380f99-659d-415e-b0e7-72ea05df3218
                    offset: string
      tags:
        - Routes
security:
  - konnectAccessToken: []
  - personalAccessToken: []
components:
  parameters:
    service_id:
      name: service_id
      description: ID **or** name of the service to lookup
      example: 7fca84d6-7d37-4a74-a7b0-93e576089a41
      in: path
      required: true
      schema:
        type: string
    runtimeGroupId:
      name: runtimeGroupId
      in: path
      required: true
      schema:
        type: string
        example: 9524ec7d-36d9-465d-a8c5-83a3c9390458
      description: The ID of your runtime group. This variable is available in the
        Konnect manager
    pagination-size:
      description: Number of resources to be returned.
      in: query
      name: size
      schema:
        type: integer
        default: 100
        maximum: 1000
        minimum: 1
    pagination-offset:
      description: Offset from which to return the next set of resources. Use the
        value of the 'offset' field from the response of a list operation as
        input here to paginate through all the resources
      in: query
      name: offset
      schema:
        type: string
    pagination-tags-filter:
      description: A list of tags to filter the list of resources on. Multiple tags
        can be concatenated using ',' to mean AND or using '/' to mean OR.
      example: tag1,tag2
      in: query
      name: tags
      schema:
        type: string
  schemas:
    Route:
      description: Route entities define rules to match client requests. Every request
        matching a given route will be proxied to its associated service.
      type: object
      properties:
        created_at:
          description: Unix epoch when the resource was created.
          type: integer
        destinations:
          description: A list of IP destinations of incoming connections that match this
            route when using stream routing. Each entry is an object with fields
            ip (optionally in CIDR range notation) and/or port.
          type: array
          items:
            type: object
            properties: {}
        headers:
          description: "One or more lists of values indexed by header name that will cause
            this route to match if present in the request. The `Host` header
            cannot be used with this attribute: hosts should be specified using
            the `hosts` attribute. When `headers` contains only one value and
            that value starts with the special prefix `~*`, the value is
            interpreted as a regular expression."
          type: object
        hosts:
          description: A list of domain names that match this route. Note that the hosts
            value is case sensitive.
          type: array
          items:
            type: string
            example: foo.example.com
        https_redirect_status_code:
          description: "The status code Kong responds with when all properties of a route
            match except the protocol i.e. if the protocol of the request is
            `HTTP` instead of `HTTPS`. `Location` header is injected by Kong if
            the field is set to 301, 302, 307 or 308. Note: This config applies
            only if the route is configured to only accept the `https`
            protocol."
          type: integer
          default: 426
        id:
          type: string
          example: 56c4566c-14cc-4132-9011-4139fcbbe50a
        methods:
          description: A list of HTTP methods that match this route.
          type: array
          items:
            type: string
        name:
          description: The name of the route. Route names must be unique, and they are
            case sensitive. For example, there can be two different routes named
            test and Test.
          type: string
        path_handling:
          description: Controls how the service path, route path and requested path are
            combined when sending a request to the upstream. See above for a
            detailed description of each behavior.
          type: string
          default: v0
        paths:
          description: A list of paths that match this route.
          type: array
          items:
            type: string
        preserve_host:
          description: When matching a route via one of the `hosts` domain names, use the
            request `Host` header in the upstream request headers. If set to
            `false`, the upstream `Host` header will be that of the service's
            `host`.
          type: boolean
          default: false
        protocols:
          description: An array of the protocols this route should allow. See the [route
            Object](#route-object) section for a list of accepted protocols.
            When set to only `https`, HTTP requests are answered with an upgrade
            error. When set to only `http`, HTTPS requests are answered with an
            error.
          type: array
          items:
            type: string
          default:
            - http
            - https
        regex_priority:
          description: A number used to choose which route resolves a given request when
            several routes match it using regexes simultaneously. When two
            routes match the path and have the same `regex_priority`, the older
            one (lowest `created_at`) is used. Note that the priority for
            non-regex routes is different (longer non-regex routes are matched
            before shorter ones).
          type: integer
          default: 0
        request_buffering:
          description: Whether to enable request body buffering or not. With HTTP 1.1, it
            may make sense to turn this off on services that receive data with
            chunked transfer encoding.
          type: boolean
          default: true
        response_buffering:
          description: Whether to enable response body buffering or not. With HTTP 1.1, it
            may make sense to turn this off on services that send data with
            chunked transfer encoding.
          type: boolean
          default: true
        service:
          description: The service this route is associated to. This is where the route
            proxies traffic to.
          type: object
          additionalProperties: false
          properties:
            id:
              type: string
        snis:
          description: A list of SNIs that match this route when using stream routing.
          type: array
          items:
            type: string
        sources:
          description: A list of IP sources of incoming connections that match this route
            when using stream routing. Each entry is an object with fields ip
            (optionally in CIDR range notation) and/or port.
          type: array
          items:
            type: object
            properties: {}
        strip_path:
          description: When matching a route via one of the `paths`, strip the matching
            prefix from the upstream request URL.
          type: boolean
          default: true
        tags:
          description: An optional set of strings associated with the route for grouping
            and filtering.
          type: array
          items:
            type: string
        updated_at:
          description: Unix epoch when the resource was last updated.
          type: integer
      example:
        hosts:
          - foo.example.com
          - foo.example.us
        id: 56c4566c-14cc-4132-9011-4139fcbbe50a
        name: example-route
        paths:
          - /v1
          - /v2
        service:
          id: bd380f99-659d-415e-b0e7-72ea05df3218
      title: Route
    pagination-offset-response:
      description: Offset is used to paginate through the API. Provide this value to
        the next list operation to fetch the next page
      type: string
  securitySchemes:
    konnectAccessToken:
      type: http
      scheme: bearer
      description: >-
        The Konnect access token is meant to be used by the Konnect dashboard
        and the decK CLI to

        authenticate with.
    personalAccessToken:
      type: http
      scheme: bearer
      description: The personal access token is meant to be used as an alternative to
        basic-auth when accessing Konnect via APIs. You can generate a Personal
        Access Token (PAT) from the personal access token page in the Konnect
        dashboard.
```
