Home
Version 3
Routes API

Routes API

Associate App with the Route

PUT /v2/routes/:guid/apps/:app_guid

Request

Route

PUT /v2/routes/93880280-f7ce-4453-ab22-0abd9d6d7b7a/apps/57d2d863-4a78-4a49-82b0-fce8f2983109

Parameters

Name Description Valid Values Example Values
app_guid The guid of the app

Body

Name Description Default Valid Values Example Values
guid The guid of the route.

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4MiIsImVtYWlsIjoiZW1haWwtMjg0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMTl9.8lWPm-f-0h-V23iH4ojDEyocxAgydJTQ9GDl8-hayZ4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/93880280-f7ce-4453-ab22-0abd9d6d7b7a/apps/57d2d863-4a78-4a49-82b0-fce8f2983109" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4MiIsImVtYWlsIjoiZW1haWwtMjg0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMTl9.8lWPm-f-0h-V23iH4ojDEyocxAgydJTQ9GDl8-hayZ4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "93880280-f7ce-4453-ab22-0abd9d6d7b7a",
    "url": "/v2/routes/93880280-f7ce-4453-ab22-0abd9d6d7b7a",
    "created_at": "2015-10-13T17:31:59Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-22",
    "path": "",
    "domain_guid": "8ff5c704-6d7e-4940-96c7-d74e273685ef",
    "space_guid": "bc4d33cd-7b16-4524-9ebd-107787e8a175",
    "service_instance_guid": null,
    "port": 0,
    "domain_url": "/v2/domains/8ff5c704-6d7e-4940-96c7-d74e273685ef",
    "space_url": "/v2/spaces/bc4d33cd-7b16-4524-9ebd-107787e8a175",
    "apps_url": "/v2/routes/93880280-f7ce-4453-ab22-0abd9d6d7b7a/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f74f9289-b0e5-4972-af97-c7d9ac31a83a
Content-Length: 636
X-Content-Type-Options: nosniff