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.eyJ1c2VyX2lkIjoidWFhLWlkLTIyOCIsImVtYWlsIjoiZW1haWwtMTY5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjIzMjM1NDd9.q_oGvoHpU-tlGrOV3fg3W3HEs-0q9d93u3LP23wQUd8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/apps/7526462e-6ce4-4608-9707-b520dd35b4b1/routes/3e3fcd30-12c8-40a2-a90b-cf3dc8b3966b

cURL

curl "https://api.[your-domain.com]/v2/apps/7526462e-6ce4-4608-9707-b520dd35b4b1/routes/3e3fcd30-12c8-40a2-a90b-cf3dc8b3966b" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyOCIsImVtYWlsIjoiZW1haWwtMTY5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjIzMjM1NDd9.q_oGvoHpU-tlGrOV3fg3W3HEs-0q9d93u3LP23wQUd8" \
	-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: 1034f1af-b22c-4cd8-b815-a98004de81d7
Content-Length: 1358
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "7526462e-6ce4-4608-9707-b520dd35b4b1",
    "url": "/v2/apps/7526462e-6ce4-4608-9707-b520dd35b4b1",
    "created_at": "2015-01-20T01:52:27+00:00",
    "updated_at": "2015-01-20T01:52:27+00:00"
  },
  "entity": {
    "name": "name-1690",
    "production": false,
    "space_guid": "61712ee7-e56b-412e-8440-2a68d78106cb",
    "stack_guid": "62a67fdf-a838-45b5-8065-55771b3bde75",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "c7f70ea6-0a30-4442-a564-d6bac9ad520a",
    "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,
    "docker_image": null,
    "package_updated_at": "2015-01-20T01:52:27+00:00",
    "detected_start_command": "",
    "space_url": "/v2/spaces/61712ee7-e56b-412e-8440-2a68d78106cb",
    "stack_url": "/v2/stacks/62a67fdf-a838-45b5-8065-55771b3bde75",
    "events_url": "/v2/apps/7526462e-6ce4-4608-9707-b520dd35b4b1/events",
    "service_bindings_url": "/v2/apps/7526462e-6ce4-4608-9707-b520dd35b4b1/service_bindings",
    "routes_url": "/v2/apps/7526462e-6ce4-4608-9707-b520dd35b4b1/routes"
  }
}