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/6883332d-3187-4a1b-a539-f3d064a82af2/routes/98c37164-ea24-4b50-badc-70d3ae06559b

Body

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NyIsImVtYWlsIjoiZW1haWwtMTkwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NTZ9.2gIFsqGK0K32eZh1Px4YpauR33FZ1x7B1SNYVI8MTRQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_instances/6883332d-3187-4a1b-a539-f3d064a82af2/routes/98c37164-ea24-4b50-badc-70d3ae06559b" -d '{}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NyIsImVtYWlsIjoiZW1haWwtMTkwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NTZ9.2gIFsqGK0K32eZh1Px4YpauR33FZ1x7B1SNYVI8MTRQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6883332d-3187-4a1b-a539-f3d064a82af2",
    "url": "/v2/service_instances/6883332d-3187-4a1b-a539-f3d064a82af2",
    "created_at": "2015-10-15T23:52:36Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1982",
    "credentials": {
      "creds-key-432": "creds-val-432"
    },
    "service_plan_guid": "31a35b04-2cf4-4b3d-bba4-be86129dc50e",
    "space_guid": "eb14d77a-e48c-4884-9237-e1cee2da1ddd",
    "gateway_data": null,
    "dashboard_url": null,
    "type": "managed_service_instance",
    "last_operation": null,
    "tags": [

    ],
    "space_url": "/v2/spaces/eb14d77a-e48c-4884-9237-e1cee2da1ddd",
    "service_plan_url": "/v2/service_plans/31a35b04-2cf4-4b3d-bba4-be86129dc50e",
    "service_bindings_url": "/v2/service_instances/6883332d-3187-4a1b-a539-f3d064a82af2/service_bindings",
    "service_keys_url": "/v2/service_instances/6883332d-3187-4a1b-a539-f3d064a82af2/service_keys",
    "routes_url": "/v2/service_instances/6883332d-3187-4a1b-a539-f3d064a82af2/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 7d0088a7-f8ac-4552-af3f-3574e9123970
Content-Length: 1032
X-Content-Type-Options: nosniff