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/7bdbe1a2-a4c5-4907-b4bd-e6e15bbcbc70/routes/920277fb-6965-46aa-b87b-f0614c341232

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.eyJ1c2VyX2lkIjoidWFhLWlkLTI0IiwiZW1haWwiOiJlbWFpbC0yNEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU4NTk5NDIyfQ.1eMNVLuLf19hJ_LcEHHChYUOZ2OJc7mdnbbdy7IsAeE
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_instances/7bdbe1a2-a4c5-4907-b4bd-e6e15bbcbc70/routes/920277fb-6965-46aa-b87b-f0614c341232" -d '{
  "parameters": {
    "the_service_broker": "wants this object"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0IiwiZW1haWwiOiJlbWFpbC0yNEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU4NTk5NDIyfQ.1eMNVLuLf19hJ_LcEHHChYUOZ2OJc7mdnbbdy7IsAeE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "7bdbe1a2-a4c5-4907-b4bd-e6e15bbcbc70",
    "url": "/v2/service_instances/7bdbe1a2-a4c5-4907-b4bd-e6e15bbcbc70",
    "created_at": "2016-03-14T22:30:22Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-98",
    "credentials": {
      "creds-key-20": "creds-val-20"
    },
    "service_plan_guid": "94325295-6151-49fd-a51d-8a930fb2b789",
    "space_guid": "5625c3da-374e-49e6-90e6-2b2043072cf3",
    "gateway_data": null,
    "dashboard_url": null,
    "type": "managed_service_instance",
    "last_operation": null,
    "tags": [

    ],
    "space_url": "/v2/spaces/5625c3da-374e-49e6-90e6-2b2043072cf3",
    "service_plan_url": "/v2/service_plans/94325295-6151-49fd-a51d-8a930fb2b789",
    "service_bindings_url": "/v2/service_instances/7bdbe1a2-a4c5-4907-b4bd-e6e15bbcbc70/service_bindings",
    "service_keys_url": "/v2/service_instances/7bdbe1a2-a4c5-4907-b4bd-e6e15bbcbc70/service_keys",
    "routes_url": "/v2/service_instances/7bdbe1a2-a4c5-4907-b4bd-e6e15bbcbc70/routes"
  }
}

Headers

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