Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/97b648db-eef9-42ca-b264-854693709ddd/routes/57508b22-14fd-4d7f-8a40-2750e6d07bfe

Parameters

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

Body

Name Description Default Valid Values Example Values

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/97b648db-eef9-42ca-b264-854693709ddd/routes/57508b22-14fd-4d7f-8a40-2750e6d07bfe" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MiIsImVtYWlsIjoiZW1haWwtMjEwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzE2NDY2NDB9.VMH3K34XJDZNP_WZw9Wh8QE69UoV1gu6261DImsqppU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "97b648db-eef9-42ca-b264-854693709ddd",
    "url": "/v2/apps/97b648db-eef9-42ca-b264-854693709ddd",
    "created_at": "2015-05-07T23:37:20Z",
    "updated_at": "2015-05-07T23:37:20Z"
  },
  "entity": {
    "name": "name-1640",
    "production": false,
    "space_guid": "75f2c889-893a-4264-a0dc-2a18f5feaf4c",
    "stack_guid": "45c423f4-d86c-48b1-9b34-5c838f369d8d",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "91294080-0eea-467a-9082-1faaeeb7c14c",
    "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,
    "diego": false,
    "docker_image": null,
    "package_updated_at": "2015-05-07T23:37:20Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "space_url": "/v2/spaces/75f2c889-893a-4264-a0dc-2a18f5feaf4c",
    "stack_url": "/v2/stacks/45c423f4-d86c-48b1-9b34-5c838f369d8d",
    "events_url": "/v2/apps/97b648db-eef9-42ca-b264-854693709ddd/events",
    "service_bindings_url": "/v2/apps/97b648db-eef9-42ca-b264-854693709ddd/service_bindings",
    "routes_url": "/v2/apps/97b648db-eef9-42ca-b264-854693709ddd/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b68afe8a-20a7-4fbf-8ead-387eb480ce3c
Content-Length: 1387
X-Content-Type-Options: nosniff