Home
Version 3
Apps API

Apps API

Associate Route with the App

PUT /v2/apps/:guid/routes/:route_guid

Fields

Name Description Default Valid Values Example Values

Parameters

Name Description Valid Values Example Values
guid The guid of the App

Request

Headers

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

Route

PUT /v2/apps/388f49d3-6640-4444-8565-65ea72367582/routes/722d39c4-39d1-4ab6-acf8-b6c6a8de2ea9

cURL

curl "https://api.[your-domain.com]/v2/apps/388f49d3-6640-4444-8565-65ea72367582/routes/722d39c4-39d1-4ab6-acf8-b6c6a8de2ea9" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxMiIsImVtYWlsIjoiZW1haWwtMjM3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNzB9.T1pFT14gvi9bBcxLtutLEp93Hn1Af_Ej0IFDGWkloSM" \
	-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: f1f349f3-f927-4f58-9889-0c86d6ab6dd0
Content-Length: 1325
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "388f49d3-6640-4444-8565-65ea72367582",
    "url": "/v2/apps/388f49d3-6640-4444-8565-65ea72367582",
    "created_at": "2014-11-24T19:32:50+00:00",
    "updated_at": "2014-11-24T19:32:50+00:00"
  },
  "entity": {
    "name": "name-1180",
    "production": false,
    "space_guid": "f92c86f9-3e15-4d3a-b228-06bde1404407",
    "stack_guid": "28d164fe-b0bd-46ad-93ef-dd81a69faef1",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "3675cbe8-cf4a-4834-ac5b-748cceea27cf",
    "command": null,
    "console": false,
    "debug": null,
    "staging_task_id": null,
    "package_state": "PENDING",
    "health_check_timeout": null,
    "staging_failed_reason": null,
    "docker_image": null,
    "package_updated_at": "2014-11-24T19:32:50+00:00",
    "detected_start_command": "",
    "space_url": "/v2/spaces/f92c86f9-3e15-4d3a-b228-06bde1404407",
    "stack_url": "/v2/stacks/28d164fe-b0bd-46ad-93ef-dd81a69faef1",
    "events_url": "/v2/apps/388f49d3-6640-4444-8565-65ea72367582/events",
    "service_bindings_url": "/v2/apps/388f49d3-6640-4444-8565-65ea72367582/service_bindings",
    "routes_url": "/v2/apps/388f49d3-6640-4444-8565-65ea72367582/routes"
  }
}