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/ba6f9e8e-3521-48d6-98bb-4d764f140aa2/routes/1c48fd2b-ea0b-4578-9d3b-bf87f5117c6d

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

cURL

curl "https://api.[your-domain.com]/v2/service_instances/ba6f9e8e-3521-48d6-98bb-4d764f140aa2/routes/1c48fd2b-ea0b-4578-9d3b-bf87f5117c6d" -d '{
  "parameters": {
    "the_service_broker": "wants this object"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1OCIsImVtYWlsIjoiZW1haWwtMjYwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MTF9.TIDCIe_UYJHAJv0SqNmLqHU57Gh7gB51vBzq281yZT4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "ba6f9e8e-3521-48d6-98bb-4d764f140aa2",
    "url": "/v2/service_instances/ba6f9e8e-3521-48d6-98bb-4d764f140aa2",
    "created_at": "2016-04-22T19:33:31Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1223",
    "credentials": {
      "creds-key-55": "creds-val-55"
    },
    "service_plan_guid": "d1f75dab-8588-4e73-a056-73105dfcd1c3",
    "space_guid": "9395193d-0be4-4de3-b693-d4d424a84c26",
    "gateway_data": null,
    "dashboard_url": null,
    "type": "managed_service_instance",
    "last_operation": null,
    "tags": [

    ],
    "space_url": "/v2/spaces/9395193d-0be4-4de3-b693-d4d424a84c26",
    "service_plan_url": "/v2/service_plans/d1f75dab-8588-4e73-a056-73105dfcd1c3",
    "service_bindings_url": "/v2/service_instances/ba6f9e8e-3521-48d6-98bb-4d764f140aa2/service_bindings",
    "service_keys_url": "/v2/service_instances/ba6f9e8e-3521-48d6-98bb-4d764f140aa2/service_keys",
    "routes_url": "/v2/service_instances/ba6f9e8e-3521-48d6-98bb-4d764f140aa2/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3a9e1993-2356-4049-b618-f62b1525b2d5
Content-Length: 1030
X-Content-Type-Options: nosniff