Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/6d9cd7cf-b633-48db-8931-cc4b9e558883/routes/debc8919-d2ca-4a58-b675-fc43105f6893

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

cURL

curl "https://api.[your-domain.com]/v2/apps/6d9cd7cf-b633-48db-8931-cc4b9e558883/routes/debc8919-d2ca-4a58-b675-fc43105f6893" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyNiIsImVtYWlsIjoiZW1haWwtMjI4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2NzR9.ABG1vXE85E7GOJGdinGr45kckD6ao4YA-dQLtep65TU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6d9cd7cf-b633-48db-8931-cc4b9e558883",
    "url": "/v2/apps/6d9cd7cf-b633-48db-8931-cc4b9e558883",
    "created_at": "2015-03-03T00:51:13Z",
    "updated_at": "2015-03-03T00:51:13Z"
  },
  "entity": {
    "name": "name-1672",
    "production": false,
    "space_guid": "17b4c420-edc8-4f02-8a1a-d4e885b9c348",
    "stack_guid": "9cea2291-a2dc-47b1-b203-b708e09ad263",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "7e3a33ca-2df7-4b02-97fb-134e54b8e980",
    "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-03-03T00:51:13Z",
    "detected_start_command": "",
    "space_url": "/v2/spaces/17b4c420-edc8-4f02-8a1a-d4e885b9c348",
    "stack_url": "/v2/stacks/9cea2291-a2dc-47b1-b203-b708e09ad263",
    "events_url": "/v2/apps/6d9cd7cf-b633-48db-8931-cc4b9e558883/events",
    "service_bindings_url": "/v2/apps/6d9cd7cf-b633-48db-8931-cc4b9e558883/service_bindings",
    "routes_url": "/v2/apps/6d9cd7cf-b633-48db-8931-cc4b9e558883/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 4142caaf-d307-408f-8b6a-001e9b9347b3
Content-Length: 1363
X-Content-Type-Options: nosniff