Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Fields

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

Request

Headers

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

Route

PUT /v2/routes/41f3fb54-4fb2-400c-a29f-bc6d2c74ad00/apps/3600dd13-6a6f-43b8-840d-0e6e89be283e

cURL

curl "https://api.[your-domain.com]/v2/routes/41f3fb54-4fb2-400c-a29f-bc6d2c74ad00/apps/3600dd13-6a6f-43b8-840d-0e6e89be283e" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5OSIsImVtYWlsIjoiZW1haWwtMjI0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTY1MjY3MTR9.HsZpiFRl61Rblg3kVJ79Y6Lm87Tge39F_CptvhdTpb8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 0dfa308d-8600-4ae8-beff-0b114b25f5b1
Content-Length: 575
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "41f3fb54-4fb2-400c-a29f-bc6d2c74ad00",
    "url": "/v2/routes/41f3fb54-4fb2-400c-a29f-bc6d2c74ad00",
    "created_at": "2014-11-13T23:38:34+00:00",
    "updated_at": null
  },
  "entity": {
    "host": "host-18",
    "domain_guid": "371a9636-fc12-433a-b462-2c1a72ebb47b",
    "space_guid": "1ec2ba0f-a5eb-4b2f-9657-b47a31deefad",
    "domain_url": "/v2/domains/371a9636-fc12-433a-b462-2c1a72ebb47b",
    "space_url": "/v2/spaces/1ec2ba0f-a5eb-4b2f-9657-b47a31deefad",
    "apps_url": "/v2/routes/41f3fb54-4fb2-400c-a29f-bc6d2c74ad00/apps"
  }
}