Associate Route with the App
PUT /v2/apps/:guid/routes/:route_guid
Request
Route
PUT /v2/apps/c880ffda-12e8-45dd-af3a-5bae28eff06a/routes/0d295073-418d-4a6c-bd27-7d08392c6b66
Parameters
Name |
Description |
Valid Values |
Example Values |
guid
|
The guid of the App
|
|
|
route_guid
|
The guid of the route
|
|
|
Headers
cURL
curl "https://api.[your-domain.com]/v2/apps/c880ffda-12e8-45dd-af3a-5bae28eff06a/routes/0d295073-418d-4a6c-bd27-7d08392c6b66" -d '' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEyNSIsImVtYWlsIjoiZW1haWwtOTZAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1MzgzNzI2NH0.-x5jwYFve4JGve-fqaN2XXZ7AKgWznB7DGX6H4136gU" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "c880ffda-12e8-45dd-af3a-5bae28eff06a",
"url": "/v2/apps/c880ffda-12e8-45dd-af3a-5bae28eff06a",
"created_at": "2016-01-19T19:41:04Z",
"updated_at": "2016-01-19T19:41:04Z"
},
"entity": {
"name": "name-626",
"production": false,
"space_guid": "6a18b4a4-abc0-4354-96cc-bfb0bb97a996",
"stack_guid": "95c4fbb4-4dca-4ca3-a832-9dc31b73cac1",
"buildpack": null,
"detected_buildpack": null,
"environment_json": null,
"memory": 1024,
"instances": 1,
"disk_quota": 1024,
"state": "STOPPED",
"version": "5c42d143-ffc0-4595-a3fa-b71ac76d3e9a",
"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,
"staging_failed_description": null,
"diego": false,
"docker_image": null,
"package_updated_at": "2016-01-19T19:41:04Z",
"detected_start_command": "",
"enable_ssh": true,
"docker_credentials_json": {
"redacted_message": "[PRIVATE DATA HIDDEN]"
},
"ports": null,
"space_url": "/v2/spaces/6a18b4a4-abc0-4354-96cc-bfb0bb97a996",
"stack_url": "/v2/stacks/95c4fbb4-4dca-4ca3-a832-9dc31b73cac1",
"events_url": "/v2/apps/c880ffda-12e8-45dd-af3a-5bae28eff06a/events",
"service_bindings_url": "/v2/apps/c880ffda-12e8-45dd-af3a-5bae28eff06a/service_bindings",
"routes_url": "/v2/apps/c880ffda-12e8-45dd-af3a-5bae28eff06a/routes"
}
}
Headers