Home
Version 3
Service Instances API

Service Instances API

Binding a service instance to a route (experimental)

PUT /v2/service_instances/:service_instance_guid/routes/:route_guid

Request

Route

PUT /v2/service_instances/0a679936-ecdc-4f19-91f7-913a9c930ed3/routes/cf1a7ba9-e8da-403c-916d-83316e24ce2d

Body

Name Description Default Valid Values Example Values
guid The guid of the Service Instance.
{}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwIiwiZW1haWwiOiJlbWFpbC0xOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ3MTE2ODI2fQ.v0e2hpQP_rSk4wzIwt9CJgMxRENeN4629i8C-wMdvMM
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_instances/0a679936-ecdc-4f19-91f7-913a9c930ed3/routes/cf1a7ba9-e8da-403c-916d-83316e24ce2d" -d '{}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwIiwiZW1haWwiOiJlbWFpbC0xOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ3MTE2ODI2fQ.v0e2hpQP_rSk4wzIwt9CJgMxRENeN4629i8C-wMdvMM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "0a679936-ecdc-4f19-91f7-913a9c930ed3",
    "url": "/v2/service_instances/0a679936-ecdc-4f19-91f7-913a9c930ed3",
    "created_at": "2015-11-03T00:53:46Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-137",
    "credentials": {
      "creds-key-47": "creds-val-47"
    },
    "service_plan_guid": "46876f61-0c84-412f-a27c-15e1fde4aa87",
    "space_guid": "72b1160f-8269-4ab2-a5b5-ef3fff8367a7",
    "gateway_data": null,
    "dashboard_url": null,
    "type": "managed_service_instance",
    "last_operation": null,
    "tags": [

    ],
    "space_url": "/v2/spaces/72b1160f-8269-4ab2-a5b5-ef3fff8367a7",
    "service_plan_url": "/v2/service_plans/46876f61-0c84-412f-a27c-15e1fde4aa87",
    "service_bindings_url": "/v2/service_instances/0a679936-ecdc-4f19-91f7-913a9c930ed3/service_bindings",
    "service_keys_url": "/v2/service_instances/0a679936-ecdc-4f19-91f7-913a9c930ed3/service_keys",
    "routes_url": "/v2/service_instances/0a679936-ecdc-4f19-91f7-913a9c930ed3/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 0de9a0a5-397d-40b1-8137-154ee648b552
Content-Length: 1029
X-Content-Type-Options: nosniff