Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/061c83bc-3860-4ee4-a5f0-fee65e2fd478/routes/4a50aa54-e592-4dcd-a0df-3c9d324c8414

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

cURL

curl "https://api.[your-domain.com]/v2/apps/061c83bc-3860-4ee4-a5f0-fee65e2fd478/routes/4a50aa54-e592-4dcd-a0df-3c9d324c8414" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MCIsImVtYWlsIjoiZW1haWwtMTYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjk2NjQxNDN9.K82T_NXwN4dhpZLkOaPM_Ygfgs4Dib-k8z78azWBlYs" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "061c83bc-3860-4ee4-a5f0-fee65e2fd478",
    "url": "/v2/apps/061c83bc-3860-4ee4-a5f0-fee65e2fd478",
    "created_at": "2015-04-15T00:55:42Z",
    "updated_at": "2015-04-15T00:55:42Z"
  },
  "entity": {
    "name": "name-1503",
    "production": false,
    "space_guid": "db16db75-78b5-47de-b7d5-5d0521abb764",
    "stack_guid": "15c1617e-768a-40bc-8eb5-6c1a12646630",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "5ef1cbf4-dade-4220-b53a-2a1835e50a62",
    "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-04-15T00:55:42Z",
    "detected_start_command": "",
    "space_url": "/v2/spaces/db16db75-78b5-47de-b7d5-5d0521abb764",
    "stack_url": "/v2/stacks/15c1617e-768a-40bc-8eb5-6c1a12646630",
    "events_url": "/v2/apps/061c83bc-3860-4ee4-a5f0-fee65e2fd478/events",
    "service_bindings_url": "/v2/apps/061c83bc-3860-4ee4-a5f0-fee65e2fd478/service_bindings",
    "routes_url": "/v2/apps/061c83bc-3860-4ee4-a5f0-fee65e2fd478/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d4b4053f-883d-4242-881a-be915e4e0e2c
Content-Length: 1363
X-Content-Type-Options: nosniff