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
  • 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.eyJ1c2VyX2lkIjoidWFhLWlkLTM3MCIsImVtYWlsIjoiZW1haWwtMjM4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NTN9.R4MrS7c7isMUgiOietFKh3r8QhSxfw63MYtRvkqVtsU
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3MCIsImVtYWlsIjoiZW1haWwtMjM4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NTN9.R4MrS7c7isMUgiOietFKh3r8QhSxfw63MYtRvkqVtsU" \
	-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": "e0bdd8d8-9863-4eec-9a0c-718898f8ef5e",
        "url": "/v2/routes/e0bdd8d8-9863-4eec-9a0c-718898f8ef5e",
        "created_at": "2015-09-30T23:30:53Z",
        "updated_at": null
      },
      "entity": {
        "host": "host-3",
        "path": "",
        "domain_guid": "92891bf3-f646-45f8-8cdc-cce63ae221e6",
        "space_guid": "063ba52b-e722-47a2-bec7-1b978c9bb507",
        "service_instance_guid": "91b42885-e96b-4e6e-bf37-fde169f70a84",
        "domain_url": "/v2/domains/92891bf3-f646-45f8-8cdc-cce63ae221e6",
        "space_url": "/v2/spaces/063ba52b-e722-47a2-bec7-1b978c9bb507",
        "service_instance_url": "/v2/service_instances/91b42885-e96b-4e6e-bf37-fde169f70a84",
        "apps_url": "/v2/routes/e0bdd8d8-9863-4eec-9a0c-718898f8ef5e/apps"
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 112e06c4-1034-4e70-8413-fdd7f52ffb22
Content-Length: 927
X-Content-Type-Options: nosniff