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/2a4af936-5865-4d82-9a55-70d28e48c675/routes/b69da582-ee56-4c79-a217-03e7ba7e2978

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.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MCIsImVtYWlsIjoiZW1haWwtMTQ3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTQ0NTE2MTl9.pkQPXicvEEzbiONgpyCTacvTdZNEKuL9Pc4-5DNjjCM
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_instances/2a4af936-5865-4d82-9a55-70d28e48c675/routes/b69da582-ee56-4c79-a217-03e7ba7e2978" -d '{
  "parameters": {
    "the_service_broker": "wants this object"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MCIsImVtYWlsIjoiZW1haWwtMTQ3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTQ0NTE2MTl9.pkQPXicvEEzbiONgpyCTacvTdZNEKuL9Pc4-5DNjjCM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "2a4af936-5865-4d82-9a55-70d28e48c675",
    "url": "/v2/service_instances/2a4af936-5865-4d82-9a55-70d28e48c675",
    "created_at": "2016-01-26T22:20:19Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-826",
    "credentials": {
      "creds-key-51": "creds-val-51"
    },
    "service_plan_guid": "0f8e4739-c1f9-491b-9df0-535be0c3a5ef",
    "space_guid": "a6f37769-1e01-4544-8e59-772b330b8ff1",
    "gateway_data": null,
    "dashboard_url": null,
    "type": "managed_service_instance",
    "last_operation": null,
    "tags": [

    ],
    "space_url": "/v2/spaces/a6f37769-1e01-4544-8e59-772b330b8ff1",
    "service_plan_url": "/v2/service_plans/0f8e4739-c1f9-491b-9df0-535be0c3a5ef",
    "service_bindings_url": "/v2/service_instances/2a4af936-5865-4d82-9a55-70d28e48c675/service_bindings",
    "service_keys_url": "/v2/service_instances/2a4af936-5865-4d82-9a55-70d28e48c675/service_keys",
    "routes_url": "/v2/service_instances/2a4af936-5865-4d82-9a55-70d28e48c675/routes"
  }
}

Headers

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