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.eyJ1c2VyX2lkIjoidWFhLWlkLTEzNyIsImVtYWlsIjoiZW1haWwtOTJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2NjAwODg4OX0.v3TqK2GxV4TUv_E-GRQZSUL_chwASsjsH49jub3a8Vg
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzNyIsImVtYWlsIjoiZW1haWwtOTJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2NjAwODg4OX0.v3TqK2GxV4TUv_E-GRQZSUL_chwASsjsH49jub3a8Vg" \
	-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": "45f84279-3c95-4a52-a4ef-77ae23ff330d",
        "url": "/v2/routes/45f84279-3c95-4a52-a4ef-77ae23ff330d",
        "created_at": "2016-06-08T16:41:28Z",
        "updated_at": "2016-06-08T16:41:26Z"
      },
      "entity": {
        "host": "host-14",
        "path": "",
        "domain_guid": "10378eb2-d769-4064-8264-5ec8beff1ba8",
        "space_guid": "f69a6cb8-1b1d-4970-a47b-062c116a5233",
        "service_instance_guid": "2808a86e-86ff-49c3-9109-7838495c3fa0",
        "port": null,
        "domain_url": "/v2/shared_domains/10378eb2-d769-4064-8264-5ec8beff1ba8",
        "space_url": "/v2/spaces/f69a6cb8-1b1d-4970-a47b-062c116a5233",
        "service_instance_url": "/v2/service_instances/2808a86e-86ff-49c3-9109-7838495c3fa0",
        "apps_url": "/v2/routes/45f84279-3c95-4a52-a4ef-77ae23ff330d/apps",
        "route_mappings_url": "/v2/routes/45f84279-3c95-4a52-a4ef-77ae23ff330d/route_mappings"
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 347f9355-29b2-4dd6-a3af-7b443917fa9e
Content-Length: 1053
X-Content-Type-Options: nosniff