Home
Version 3
Service Instances API

Service Instances API

List all Routes for the Service Instance

GET /v2/service_instances/:guid/routes

Request

Route

GET /v2/service_instances/7a19bc80-77ef-48d2-86e4-e503a913eb66/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.eyJ1c2VyX2lkIjoidWFhLWlkLTM2MCIsImVtYWlsIjoiZW1haWwtMjYyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MTF9.eGtZOGIwdUuL3Yy6CuUgsRAiCqx0AWuM04dL4sQS6do
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_instances/7a19bc80-77ef-48d2-86e4-e503a913eb66/routes" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2MCIsImVtYWlsIjoiZW1haWwtMjYyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MTF9.eGtZOGIwdUuL3Yy6CuUgsRAiCqx0AWuM04dL4sQS6do" \
	-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": "c898954f-1afd-4373-9df0-eb215ad07581",
        "url": "/v2/routes/c898954f-1afd-4373-9df0-eb215ad07581",
        "created_at": "2016-04-22T19:33:31Z",
        "updated_at": null
      },
      "entity": {
        "host": "host-28",
        "path": "",
        "domain_guid": "b2f88e80-42b7-4e86-b58a-0b032c11e7f6",
        "space_guid": "914f009d-d6ef-4cf6-b8ce-dbd764fffc9a",
        "service_instance_guid": "7a19bc80-77ef-48d2-86e4-e503a913eb66",
        "port": null,
        "domain_url": "/v2/domains/b2f88e80-42b7-4e86-b58a-0b032c11e7f6",
        "space_url": "/v2/spaces/914f009d-d6ef-4cf6-b8ce-dbd764fffc9a",
        "service_instance_url": "/v2/service_instances/7a19bc80-77ef-48d2-86e4-e503a913eb66",
        "apps_url": "/v2/routes/c898954f-1afd-4373-9df0-eb215ad07581/apps",
        "route_mappings_url": "/v2/routes/c898954f-1afd-4373-9df0-eb215ad07581/route_mappings"
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 860e1e40-8144-43a0-8213-9c41f90be0e3
Content-Length: 1046
X-Content-Type-Options: nosniff