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/6da8d173-b409-4094-949f-3c1cc8a68503/routes/3d241cb0-e616-4855-a1ae-838edffded49

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.eyJ1c2VyX2lkIjoidWFhLWlkLTE1NiIsImVtYWlsIjoiZW1haWwtMTExQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTB9.-nyGw-jDDMr-Z6KuBP4l6p02lGtLuWqb_WEGvEBD6Nk
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_instances/6da8d173-b409-4094-949f-3c1cc8a68503/routes/3d241cb0-e616-4855-a1ae-838edffded49" -d '{
  "parameters": {
    "the_service_broker": "wants this object"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1NiIsImVtYWlsIjoiZW1haWwtMTExQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTB9.-nyGw-jDDMr-Z6KuBP4l6p02lGtLuWqb_WEGvEBD6Nk" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6da8d173-b409-4094-949f-3c1cc8a68503",
    "url": "/v2/service_instances/6da8d173-b409-4094-949f-3c1cc8a68503",
    "created_at": "2016-06-08T16:41:30Z",
    "updated_at": "2016-06-08T16:41:26Z"
  },
  "entity": {
    "name": "name-1548",
    "credentials": {
      "creds-key-45": "creds-val-45"
    },
    "service_plan_guid": "4cfefd27-3eb7-4f55-806e-1db649038ad2",
    "space_guid": "ff4aefaa-0c1f-4a0f-9f96-10448ba8f87e",
    "gateway_data": null,
    "dashboard_url": null,
    "type": "managed_service_instance",
    "last_operation": null,
    "tags": [

    ],
    "space_url": "/v2/spaces/ff4aefaa-0c1f-4a0f-9f96-10448ba8f87e",
    "service_plan_url": "/v2/service_plans/4cfefd27-3eb7-4f55-806e-1db649038ad2",
    "service_bindings_url": "/v2/service_instances/6da8d173-b409-4094-949f-3c1cc8a68503/service_bindings",
    "service_keys_url": "/v2/service_instances/6da8d173-b409-4094-949f-3c1cc8a68503/service_keys",
    "routes_url": "/v2/service_instances/6da8d173-b409-4094-949f-3c1cc8a68503/routes",
    "shared_from_url": "/v2/service_instances/6da8d173-b409-4094-949f-3c1cc8a68503/shared_from",
    "shared_to_url": "/v2/service_instances/6da8d173-b409-4094-949f-3c1cc8a68503/shared_to"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 4b4acee4-87c4-488e-b276-3d8654005dee
Content-Length: 1030
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.service_instance.bind_route

Attribute Name Value
id 195
guid 36289f96-60ee-466e-a8ae-8eaf66505eb2
created_at 2016-06-08 16:41:30 UTC
updated_at
timestamp 2016-06-08 16:41:30 UTC
type audit.service_instance.bind_route
actor uaa-id-156
actor_type user
actee 6da8d173-b409-4094-949f-3c1cc8a68503
actee_type service_instance
metadata
{
  "request": {
    "route_guid": "3d241cb0-e616-4855-a1ae-838edffded49",
    "parameters": "[PRIVATE DATA HIDDEN]"
  }
}
space_id
organization_guid 39a1f5bb-a679-40ec-a100-f74cea0222ff
space_guid ff4aefaa-0c1f-4a0f-9f96-10448ba8f87e
actor_name [email protected]
actee_name name-1548