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/438fa718-0c92-4730-b904-467226f6ba67/routes/accddd53-6833-41d3-afc4-a336103c1f6e

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.eyJ1c2VyX2lkIjoidWFhLWlkLTEyMiIsImVtYWlsIjoiZW1haWwtOTFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MDUwNjY0Mn0.Xtkr6rpmKcZvd10dfb6T7ethlR-7DQdLTHoMr8QqROE
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_instances/438fa718-0c92-4730-b904-467226f6ba67/routes/accddd53-6833-41d3-afc4-a336103c1f6e" -d '{
  "parameters": {
    "the_service_broker": "wants this object"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEyMiIsImVtYWlsIjoiZW1haWwtOTFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MDUwNjY0Mn0.Xtkr6rpmKcZvd10dfb6T7ethlR-7DQdLTHoMr8QqROE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "438fa718-0c92-4730-b904-467226f6ba67",
    "url": "/v2/service_instances/438fa718-0c92-4730-b904-467226f6ba67",
    "created_at": "2016-04-06T00:17:22Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-329",
    "credentials": {
      "creds-key-6": "creds-val-6"
    },
    "service_plan_guid": "5cf0f1e3-44c4-4ad5-bf69-ec5b4b25f9ea",
    "space_guid": "770db927-d666-48d1-b457-5709a138392d",
    "gateway_data": null,
    "dashboard_url": null,
    "type": "managed_service_instance",
    "last_operation": null,
    "tags": [

    ],
    "space_url": "/v2/spaces/770db927-d666-48d1-b457-5709a138392d",
    "service_plan_url": "/v2/service_plans/5cf0f1e3-44c4-4ad5-bf69-ec5b4b25f9ea",
    "service_bindings_url": "/v2/service_instances/438fa718-0c92-4730-b904-467226f6ba67/service_bindings",
    "service_keys_url": "/v2/service_instances/438fa718-0c92-4730-b904-467226f6ba67/service_keys",
    "routes_url": "/v2/service_instances/438fa718-0c92-4730-b904-467226f6ba67/routes"
  }
}

Headers

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