Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/13033456-ac41-4684-ad56-738cea78a289/routes/bca16d76-cdfa-4c16-b798-907ae8410bf8

Parameters

Name Description Valid Values Example Values
guid The guid of the App
route_guid The guid of the route

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0NCIsImVtYWlsIjoiZW1haWwtOTBAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0MTY2MjYwMH0.5hFGf-kKUGPXeFOvOAWQL-8Eo51WZGTIEe69buh7Qhw
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/13033456-ac41-4684-ad56-738cea78a289/routes/bca16d76-cdfa-4c16-b798-907ae8410bf8" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0NCIsImVtYWlsIjoiZW1haWwtOTBAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0MTY2MjYwMH0.5hFGf-kKUGPXeFOvOAWQL-8Eo51WZGTIEe69buh7Qhw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "13033456-ac41-4684-ad56-738cea78a289",
    "url": "/v2/apps/13033456-ac41-4684-ad56-738cea78a289",
    "created_at": "2015-08-31T21:50:00Z",
    "updated_at": "2015-08-31T21:50:00Z"
  },
  "entity": {
    "name": "name-461",
    "production": false,
    "space_guid": "9129fa7d-a326-468c-9151-8303e2aa0c9b",
    "stack_guid": "d848cb17-a07d-4313-8a4f-20030ee03bed",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "842a097b-0fe5-4da4-9b4e-060defdecdeb",
    "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": "2015-08-31T21:50:00Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "docker_credentials_json": {
      "redacted_message": "[PRIVATE DATA HIDDEN]"
    },
    "space_url": "/v2/spaces/9129fa7d-a326-468c-9151-8303e2aa0c9b",
    "stack_url": "/v2/stacks/d848cb17-a07d-4313-8a4f-20030ee03bed",
    "events_url": "/v2/apps/13033456-ac41-4684-ad56-738cea78a289/events",
    "service_bindings_url": "/v2/apps/13033456-ac41-4684-ad56-738cea78a289/service_bindings",
    "routes_url": "/v2/apps/13033456-ac41-4684-ad56-738cea78a289/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 31871c3d-fcbb-40f1-99c0-31f52db3433b
Content-Length: 1516
X-Content-Type-Options: nosniff