Home
Version 3
Routes API

Routes API

List all Routes

GET /v2/routes

Request

Route

GET /v2/routes

Parameters

Name Description Valid Values Example Values
q Parameters used to filter the result set.
Format queries as <filter><op><value>
Valid ops: : >= <= < > IN
Valid filters: host, domain_guid, organization_guid, path, port
  • q=filter:value
  • q=filter>value
  • q=filter IN a,b,c
page Page of results to fetch
results-per-page Number of results per page
order-direction Order of the results: asc (default) or desc
inline-relations-depth 0 - don't inline any relations and return URLs. Otherwise, inline to depth N.
orphan-relations 0 - de-duplicate object entries in response
exclude-relations comma-delimited list of relations to drop from response
include-relations comma-delimited list of the only relations to include in response

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyNyIsImVtYWlsIjoiZW1haWwtMjk2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NjJ9.tcirLwgtm_DO001BOHmwFloa6xgTYsnv0vEIGDNbC6w
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyNyIsImVtYWlsIjoiZW1haWwtMjk2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NjJ9.tcirLwgtm_DO001BOHmwFloa6xgTYsnv0vEIGDNbC6w" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "total_results": 1,
  "total_pages": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [
    {
      "metadata": {
        "guid": "527a3d2a-e4a8-4206-8f58-93a763f25c3a",
        "url": "/v2/routes/527a3d2a-e4a8-4206-8f58-93a763f25c3a",
        "created_at": "2016-04-06T00:17:42Z",
        "updated_at": null
      },
      "entity": {
        "host": "host-27",
        "path": "",
        "domain_guid": "ce498cdc-8ffd-4eda-b5b1-f09e1a55a8c0",
        "space_guid": "35bfec45-eda0-40c3-9fc0-5474ebec1e94",
        "service_instance_guid": "02d07960-ec78-40e0-8d1d-67a31ef59bbd",
        "port": 0,
        "domain_url": "/v2/domains/ce498cdc-8ffd-4eda-b5b1-f09e1a55a8c0",
        "space_url": "/v2/spaces/35bfec45-eda0-40c3-9fc0-5474ebec1e94",
        "service_instance_url": "/v2/service_instances/02d07960-ec78-40e0-8d1d-67a31ef59bbd",
        "apps_url": "/v2/routes/527a3d2a-e4a8-4206-8f58-93a763f25c3a/apps",
        "route_mappings_url": "/v2/routes/527a3d2a-e4a8-4206-8f58-93a763f25c3a/route_mappings"
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 1043
X-Content-Type-Options: nosniff