Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/cab9cee9-9aef-434b-92f2-5a167afedd7c/routes/ebc02c00-8db2-4060-9785-162cfe00d6ce

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2OCIsImVtYWlsIjoiZW1haWwtMTAxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1MzR9.SgK_-_a-VBYF2pgZ_o3kJbu2vNBfHmUfcyaYNvrWbKU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/cab9cee9-9aef-434b-92f2-5a167afedd7c/routes/ebc02c00-8db2-4060-9785-162cfe00d6ce" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2OCIsImVtYWlsIjoiZW1haWwtMTAxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1MzR9.SgK_-_a-VBYF2pgZ_o3kJbu2vNBfHmUfcyaYNvrWbKU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "cab9cee9-9aef-434b-92f2-5a167afedd7c",
    "url": "/v2/apps/cab9cee9-9aef-434b-92f2-5a167afedd7c",
    "created_at": "2015-09-11T18:38:53Z",
    "updated_at": "2015-09-11T18:38:53Z"
  },
  "entity": {
    "name": "name-584",
    "production": false,
    "space_guid": "bfb50c4a-e835-447e-a00a-159355c414ef",
    "stack_guid": "d23231d8-7a47-490c-957c-2e931fc539cc",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "5cbc47c0-0807-4706-a448-f1bd642878d9",
    "command": null,
    "console": false,
    "debug": null,
    "staging_task_id": null,
    "package_state": "PENDING",
    "health_check_type": "port",
    "health_check_timeout": null,
    "staging_failed_reason": null,
    "staging_failed_description": null,
    "diego": false,
    "docker_image": null,
    "package_updated_at": "2015-09-11T18:38:53Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "docker_credentials_json": {
      "redacted_message": "[PRIVATE DATA HIDDEN]"
    },
    "space_url": "/v2/spaces/bfb50c4a-e835-447e-a00a-159355c414ef",
    "stack_url": "/v2/stacks/d23231d8-7a47-490c-957c-2e931fc539cc",
    "events_url": "/v2/apps/cab9cee9-9aef-434b-92f2-5a167afedd7c/events",
    "service_bindings_url": "/v2/apps/cab9cee9-9aef-434b-92f2-5a167afedd7c/service_bindings",
    "routes_url": "/v2/apps/cab9cee9-9aef-434b-92f2-5a167afedd7c/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 8ba506e9-ccd5-4b7c-b80d-92fbbf4d6655
Content-Length: 1516
X-Content-Type-Options: nosniff