Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/87dbb133-f9c6-4588-aeea-71d6430f444c/routes/45dbe96e-9ee4-4d48-8b3c-811380f37b31

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQzNiIsImVtYWlsIjoiZW1haWwtMjk4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDR9.Drb95OrpnnuZVfBRnT7lcHIG3h9cPlqab07kiMUJq64
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/87dbb133-f9c6-4588-aeea-71d6430f444c/routes/45dbe96e-9ee4-4d48-8b3c-811380f37b31" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQzNiIsImVtYWlsIjoiZW1haWwtMjk4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDR9.Drb95OrpnnuZVfBRnT7lcHIG3h9cPlqab07kiMUJq64" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "87dbb133-f9c6-4588-aeea-71d6430f444c",
    "url": "/v2/apps/87dbb133-f9c6-4588-aeea-71d6430f444c",
    "created_at": "2016-06-08T16:41:44Z",
    "updated_at": "2016-06-08T16:41:44Z"
  },
  "entity": {
    "name": "name-2299",
    "production": false,
    "space_guid": "e852f283-7d72-4e38-815a-ce098d835ce1",
    "stack_guid": "140a42ab-7f81-492c-bfad-802e0afe2d57",
    "buildpack": null,
    "detected_buildpack": null,
    "detected_buildpack_guid": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "2bf0b138-bf9a-456f-bbd2-588677717eba",
    "command": null,
    "console": false,
    "debug": null,
    "staging_task_id": null,
    "package_state": "PENDING",
    "health_check_http_endpoint": "",
    "health_check_type": "port",
    "health_check_timeout": null,
    "staging_failed_reason": null,
    "staging_failed_description": null,
    "diego": false,
    "docker_image": null,
    "docker_credentials": {
      "username": null,
      "password": null
    },
    "package_updated_at": "2016-06-08T16:41:44Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "ports": null,
    "space_url": "/v2/spaces/e852f283-7d72-4e38-815a-ce098d835ce1",
    "stack_url": "/v2/stacks/140a42ab-7f81-492c-bfad-802e0afe2d57",
    "routes_url": "/v2/apps/87dbb133-f9c6-4588-aeea-71d6430f444c/routes",
    "events_url": "/v2/apps/87dbb133-f9c6-4588-aeea-71d6430f444c/events",
    "service_bindings_url": "/v2/apps/87dbb133-f9c6-4588-aeea-71d6430f444c/service_bindings",
    "route_mappings_url": "/v2/apps/87dbb133-f9c6-4588-aeea-71d6430f444c/route_mappings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 531087c0-951f-4a62-a581-a9c597650b03
Content-Length: 1626
X-Content-Type-Options: nosniff