Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/2df5ff0e-986c-4051-8e9a-82f57d9a6b89/routes/4cbb5212-9f57-4381-ac55-33681df38f74

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.eyJ1c2VyX2lkIjoidWFhLWlkLTEwMCIsImVtYWlsIjoiZW1haWwtOTlAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzMjMxMzYxMn0.9Cm5MuqFuHc_G-TXfQ1Z4UcbL3xxeLeMBLXqM6FmlqU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/2df5ff0e-986c-4051-8e9a-82f57d9a6b89/routes/4cbb5212-9f57-4381-ac55-33681df38f74" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwMCIsImVtYWlsIjoiZW1haWwtOTlAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzMjMxMzYxMn0.9Cm5MuqFuHc_G-TXfQ1Z4UcbL3xxeLeMBLXqM6FmlqU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "2df5ff0e-986c-4051-8e9a-82f57d9a6b89",
    "url": "/v2/apps/2df5ff0e-986c-4051-8e9a-82f57d9a6b89",
    "created_at": "2015-05-15T16:53:32Z",
    "updated_at": "2015-05-15T16:53:32Z"
  },
  "entity": {
    "name": "name-630",
    "production": false,
    "space_guid": "a49c93de-c22c-4f72-9dfc-21ba71e7a544",
    "stack_guid": "1f938013-fb3d-481e-8bbe-200d5344b985",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "e9a5c2dc-c288-4641-a6be-9fcf47f72b2a",
    "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-15T16:53:32Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "space_url": "/v2/spaces/a49c93de-c22c-4f72-9dfc-21ba71e7a544",
    "stack_url": "/v2/stacks/1f938013-fb3d-481e-8bbe-200d5344b985",
    "events_url": "/v2/apps/2df5ff0e-986c-4051-8e9a-82f57d9a6b89/events",
    "service_bindings_url": "/v2/apps/2df5ff0e-986c-4051-8e9a-82f57d9a6b89/service_bindings",
    "routes_url": "/v2/apps/2df5ff0e-986c-4051-8e9a-82f57d9a6b89/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f2a48a1a-3ce4-4c1c-97ed-3ca0aa6db83c
Content-Length: 1386
X-Content-Type-Options: nosniff