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.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MSIsImVtYWlsIjoiZW1haWwtMjA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTY1MjY3MTJ9.bZEp2lIA9KAE8tIxyZOuEABqBYr5pka_vOonCXcn96U
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/apps/1f49bbd9-d158-425a-8963-f02605b0d9f3/routes/497b4e63-517a-47ce-bb20-22608e9a52a3

cURL

curl "https://api.[your-domain.com]/v2/apps/1f49bbd9-d158-425a-8963-f02605b0d9f3/routes/497b4e63-517a-47ce-bb20-22608e9a52a3" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MSIsImVtYWlsIjoiZW1haWwtMjA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTY1MjY3MTJ9.bZEp2lIA9KAE8tIxyZOuEABqBYr5pka_vOonCXcn96U" \
	-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: be523ce9-b8b4-4d3b-a5b6-b58e8c695834
Content-Length: 1325
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "1f49bbd9-d158-425a-8963-f02605b0d9f3",
    "url": "/v2/apps/1f49bbd9-d158-425a-8963-f02605b0d9f3",
    "created_at": "2014-11-13T23:38:32+00:00",
    "updated_at": "2014-11-13T23:38:32+00:00"
  },
  "entity": {
    "name": "name-1156",
    "production": false,
    "space_guid": "363bc4df-04bf-4bdb-a3ac-9444b5d6356c",
    "stack_guid": "b22a26bf-92a0-4ba9-85e4-c8d5edddc5a1",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "2128f436-e47b-46f1-94ff-57e1cb140098",
    "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-13T23:38:32+00:00",
    "detected_start_command": "",
    "space_url": "/v2/spaces/363bc4df-04bf-4bdb-a3ac-9444b5d6356c",
    "stack_url": "/v2/stacks/b22a26bf-92a0-4ba9-85e4-c8d5edddc5a1",
    "events_url": "/v2/apps/1f49bbd9-d158-425a-8963-f02605b0d9f3/events",
    "service_bindings_url": "/v2/apps/1f49bbd9-d158-425a-8963-f02605b0d9f3/service_bindings",
    "routes_url": "/v2/apps/1f49bbd9-d158-425a-8963-f02605b0d9f3/routes"
  }
}