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/e7e5b08e-c530-4c1c-b420-fa0b09b3770d/routes/3510510b-896c-48fe-b8e7-600687e8c563

Body

Name Description Default Valid Values Example Values
guid The guid of the Service Instance.
{}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTcxIiwiZW1haWwiOiJlbWFpbC0zOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUxNDEzNjc4fQ.s5vGHuhZJdTxWBjA0PJ72P_ud6CQ6zGqffCvQzhoNPA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_instances/e7e5b08e-c530-4c1c-b420-fa0b09b3770d/routes/3510510b-896c-48fe-b8e7-600687e8c563" -d '{}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTcxIiwiZW1haWwiOiJlbWFpbC0zOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUxNDEzNjc4fQ.s5vGHuhZJdTxWBjA0PJ72P_ud6CQ6zGqffCvQzhoNPA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "e7e5b08e-c530-4c1c-b420-fa0b09b3770d",
    "url": "/v2/service_instances/e7e5b08e-c530-4c1c-b420-fa0b09b3770d",
    "created_at": "2015-12-22T18:27:58Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-160",
    "credentials": {
      "creds-key-89": "creds-val-89"
    },
    "service_plan_guid": "957307f5-6811-4eba-8667-ffee5a704a4a",
    "space_guid": "36b01ada-ef02-4ff5-9f78-cd9e704211d2",
    "gateway_data": null,
    "dashboard_url": null,
    "type": "managed_service_instance",
    "last_operation": null,
    "tags": [

    ],
    "space_url": "/v2/spaces/36b01ada-ef02-4ff5-9f78-cd9e704211d2",
    "service_plan_url": "/v2/service_plans/957307f5-6811-4eba-8667-ffee5a704a4a",
    "service_bindings_url": "/v2/service_instances/e7e5b08e-c530-4c1c-b420-fa0b09b3770d/service_bindings",
    "service_keys_url": "/v2/service_instances/e7e5b08e-c530-4c1c-b420-fa0b09b3770d/service_keys",
    "routes_url": "/v2/service_instances/e7e5b08e-c530-4c1c-b420-fa0b09b3770d/routes"
  }
}

Headers

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