Associate Route with the App
PUT /v2/apps/:guid/routes/:route_guid
Request
Route
PUT /v2/apps/64d80ec7-008b-4e54-900c-f0ad8099d7c5/routes/381193cf-a0f5-421b-a46a-08d7b96ac361
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/64d80ec7-008b-4e54-900c-f0ad8099d7c5/routes/381193cf-a0f5-421b-a46a-08d7b96ac361" -d '' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3OCIsImVtYWlsIjoiZW1haWwtMTM5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0MzZ9.jMw8zvcJopKklmP1lbKTzwgvTx5gBnQDN0CnL5TpX3s" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "64d80ec7-008b-4e54-900c-f0ad8099d7c5",
"url": "/v2/apps/64d80ec7-008b-4e54-900c-f0ad8099d7c5",
"created_at": "2016-03-14T22:30:36Z",
"updated_at": "2016-03-14T22:30:36Z"
},
"entity": {
"name": "name-1659",
"production": false,
"space_guid": "f6195825-0c2a-43b1-af99-607b90ce0e78",
"stack_guid": "c3dea135-6f2b-409b-b9ab-56ca0e036eb0",
"buildpack": null,
"detected_buildpack": null,
"environment_json": null,
"memory": 1024,
"instances": 1,
"disk_quota": 1024,
"state": "STOPPED",
"version": "327d2d23-b54c-4ce5-8553-886b6d737e7f",
"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-03-14T22:30:36Z",
"detected_start_command": "",
"enable_ssh": true,
"docker_credentials_json": {
"redacted_message": "[PRIVATE DATA HIDDEN]"
},
"ports": null,
"space_url": "/v2/spaces/f6195825-0c2a-43b1-af99-607b90ce0e78",
"stack_url": "/v2/stacks/c3dea135-6f2b-409b-b9ab-56ca0e036eb0",
"routes_url": "/v2/apps/64d80ec7-008b-4e54-900c-f0ad8099d7c5/routes",
"events_url": "/v2/apps/64d80ec7-008b-4e54-900c-f0ad8099d7c5/events",
"service_bindings_url": "/v2/apps/64d80ec7-008b-4e54-900c-f0ad8099d7c5/service_bindings",
"route_mappings_url": "/v2/apps/64d80ec7-008b-4e54-900c-f0ad8099d7c5/route_mappings"
}
}
Headers