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/bd313baf-7f01-489c-89a8-22eff3e0edc1/routes/b25b8f00-41ff-417e-87eb-e550f6c2cb1c

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.eyJ1c2VyX2lkIjoidWFhLWlkLTE3OSIsImVtYWlsIjoiZW1haWwtMTE4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2NzN9.677Gafd7vp7A3OTzZsFHiLsWnKElSmt-7njrSgzmIOs
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_instances/bd313baf-7f01-489c-89a8-22eff3e0edc1/routes/b25b8f00-41ff-417e-87eb-e550f6c2cb1c" -d '{
  "parameters": {
    "the_service_broker": "wants this object"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3OSIsImVtYWlsIjoiZW1haWwtMTE4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2NzN9.677Gafd7vp7A3OTzZsFHiLsWnKElSmt-7njrSgzmIOs" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "bd313baf-7f01-489c-89a8-22eff3e0edc1",
    "url": "/v2/service_instances/bd313baf-7f01-489c-89a8-22eff3e0edc1",
    "created_at": "2016-03-17T21:41:13Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-728",
    "credentials": {
      "creds-key-20": "creds-val-20"
    },
    "service_plan_guid": "61e22e23-afea-4188-af92-7ed604e99dfe",
    "space_guid": "74a3ae1c-71cb-4c97-ad46-075711d1eb3a",
    "gateway_data": null,
    "dashboard_url": null,
    "type": "managed_service_instance",
    "last_operation": null,
    "tags": [

    ],
    "space_url": "/v2/spaces/74a3ae1c-71cb-4c97-ad46-075711d1eb3a",
    "service_plan_url": "/v2/service_plans/61e22e23-afea-4188-af92-7ed604e99dfe",
    "service_bindings_url": "/v2/service_instances/bd313baf-7f01-489c-89a8-22eff3e0edc1/service_bindings",
    "service_keys_url": "/v2/service_instances/bd313baf-7f01-489c-89a8-22eff3e0edc1/service_keys",
    "routes_url": "/v2/service_instances/bd313baf-7f01-489c-89a8-22eff3e0edc1/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 1029
X-Content-Type-Options: nosniff