Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/38d60bda-b80a-4b10-a958-b98c15594c38/routes/48fd2fec-df78-4adc-8c8e-c777e2b7b4ea

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NSIsImVtYWlsIjoiZW1haWwtMTg3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2Mzd9.z4fgGz6zlH00APbTvM-Qyx8ZNghmdj3yX9cG2b5SPOA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/38d60bda-b80a-4b10-a958-b98c15594c38/routes/48fd2fec-df78-4adc-8c8e-c777e2b7b4ea" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NSIsImVtYWlsIjoiZW1haWwtMTg3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2Mzd9.z4fgGz6zlH00APbTvM-Qyx8ZNghmdj3yX9cG2b5SPOA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "38d60bda-b80a-4b10-a958-b98c15594c38",
    "url": "/v2/apps/38d60bda-b80a-4b10-a958-b98c15594c38",
    "created_at": "2016-04-16T01:23:57Z",
    "updated_at": "2016-04-16T01:23:57Z"
  },
  "entity": {
    "name": "name-918",
    "production": false,
    "space_guid": "0dd89679-88e3-47a6-a9bd-9a4c044d93f3",
    "stack_guid": "e9312c58-83a3-4d6c-a910-7a0ddbb196ef",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "6ce15c75-3ebf-49c9-a5e5-8cf80d599c69",
    "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-04-16T01:23:57Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "docker_credentials_json": {
      "redacted_message": "[PRIVATE DATA HIDDEN]"
    },
    "ports": null,
    "space_url": "/v2/spaces/0dd89679-88e3-47a6-a9bd-9a4c044d93f3",
    "stack_url": "/v2/stacks/e9312c58-83a3-4d6c-a910-7a0ddbb196ef",
    "routes_url": "/v2/apps/38d60bda-b80a-4b10-a958-b98c15594c38/routes",
    "events_url": "/v2/apps/38d60bda-b80a-4b10-a958-b98c15594c38/events",
    "service_bindings_url": "/v2/apps/38d60bda-b80a-4b10-a958-b98c15594c38/service_bindings",
    "route_mappings_url": "/v2/apps/38d60bda-b80a-4b10-a958-b98c15594c38/route_mappings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 04b28695-1132-4c6a-a568-fc1bc693e3c2
Content-Length: 1625
X-Content-Type-Options: nosniff