Home
Version 3
Service Instances API

Service Instances API

Binding a Service Instance to a Route

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

Request

Route

PUT /v2/service_instances/9863f7cb-4b02-473a-be7b-10071ad10096/routes/c204c5a9-dc85-4d41-b6e3-a286a2c8fc1d

Body

Name Description Default Valid Values Example Values
parameters Arbitrary parameters to pass along to the service broker. Must be a JSON object.
{
  "parameters": {
    "the_service_broker": "wants this object"
  }
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4OSIsImVtYWlsIjoiZW1haWwtMTkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2Mzh9.sLy46aNNeWKZvgH0xbnzwkJVHCEZkHT27_xlLtmZCnk
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_instances/9863f7cb-4b02-473a-be7b-10071ad10096/routes/c204c5a9-dc85-4d41-b6e3-a286a2c8fc1d" -d '{
  "parameters": {
    "the_service_broker": "wants this object"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4OSIsImVtYWlsIjoiZW1haWwtMTkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2Mzh9.sLy46aNNeWKZvgH0xbnzwkJVHCEZkHT27_xlLtmZCnk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "9863f7cb-4b02-473a-be7b-10071ad10096",
    "url": "/v2/service_instances/9863f7cb-4b02-473a-be7b-10071ad10096",
    "created_at": "2016-04-16T01:23:57Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-966",
    "credentials": {
      "creds-key-34": "creds-val-34"
    },
    "service_plan_guid": "013925d1-0801-4ce1-945c-841d968b3e5a",
    "space_guid": "346a9088-1793-4afb-a859-d95cc3fc8a4a",
    "gateway_data": null,
    "dashboard_url": null,
    "type": "managed_service_instance",
    "last_operation": null,
    "tags": [

    ],
    "space_url": "/v2/spaces/346a9088-1793-4afb-a859-d95cc3fc8a4a",
    "service_plan_url": "/v2/service_plans/013925d1-0801-4ce1-945c-841d968b3e5a",
    "service_bindings_url": "/v2/service_instances/9863f7cb-4b02-473a-be7b-10071ad10096/service_bindings",
    "service_keys_url": "/v2/service_instances/9863f7cb-4b02-473a-be7b-10071ad10096/service_keys",
    "routes_url": "/v2/service_instances/9863f7cb-4b02-473a-be7b-10071ad10096/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d574e364-a3a1-4300-99b5-d2ff1846e42c
Content-Length: 1029
X-Content-Type-Options: nosniff