Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/164c719a-4e18-4ab0-908a-05fa40ad9e97/routes/7a8c7842-eda2-41bd-89cb-41b9f69e2957

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwNiIsImVtYWlsIjoiZW1haWwtMjIzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3OTR9.4Xob9cLtipkfnjXocPkJZMFI3sX6tFGvzAmXzbPKEwA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/164c719a-4e18-4ab0-908a-05fa40ad9e97/routes/7a8c7842-eda2-41bd-89cb-41b9f69e2957" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwNiIsImVtYWlsIjoiZW1haWwtMjIzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3OTR9.4Xob9cLtipkfnjXocPkJZMFI3sX6tFGvzAmXzbPKEwA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "164c719a-4e18-4ab0-908a-05fa40ad9e97",
    "url": "/v2/apps/164c719a-4e18-4ab0-908a-05fa40ad9e97",
    "created_at": "2015-07-06T23:23:14Z",
    "updated_at": "2015-07-06T23:23:14Z"
  },
  "entity": {
    "name": "name-1851",
    "production": false,
    "space_guid": "39e6bf0b-9a73-4558-ab0c-4f3c380f2d14",
    "stack_guid": "31db6901-8f22-4733-9a8b-b96bc7ac8c9d",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "7adad98c-af06-42fe-bdb5-8f8b04e0980a",
    "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-07-06T23:23:14Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "docker_credentials_json": {
      "redacted_message": "[PRIVATE DATA HIDDEN]"
    },
    "space_url": "/v2/spaces/39e6bf0b-9a73-4558-ab0c-4f3c380f2d14",
    "stack_url": "/v2/stacks/31db6901-8f22-4733-9a8b-b96bc7ac8c9d",
    "events_url": "/v2/apps/164c719a-4e18-4ab0-908a-05fa40ad9e97/events",
    "service_bindings_url": "/v2/apps/164c719a-4e18-4ab0-908a-05fa40ad9e97/service_bindings",
    "routes_url": "/v2/apps/164c719a-4e18-4ab0-908a-05fa40ad9e97/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 98d7e75d-a0ad-4d23-b317-e31c98ba72d0
Content-Length: 1517
X-Content-Type-Options: nosniff