Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/6c43090d-c365-4050-98a0-92e6e59bb412/routes/6910fcd1-4d95-4ee9-8ee7-e8330932d0e1

Parameters

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

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NyIsImVtYWlsIjoiZW1haWwtMTg5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NjF9.TQeEhlgy8LgmP8r7B4yCJGOWNq57fuQPPRsUOclwtBI
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/6c43090d-c365-4050-98a0-92e6e59bb412/routes/6910fcd1-4d95-4ee9-8ee7-e8330932d0e1" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NyIsImVtYWlsIjoiZW1haWwtMTg5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NjF9.TQeEhlgy8LgmP8r7B4yCJGOWNq57fuQPPRsUOclwtBI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6c43090d-c365-4050-98a0-92e6e59bb412",
    "url": "/v2/apps/6c43090d-c365-4050-98a0-92e6e59bb412",
    "created_at": "2015-03-20T18:27:40Z",
    "updated_at": "2015-03-20T18:27:40Z"
  },
  "entity": {
    "name": "name-1620",
    "production": false,
    "space_guid": "aaf42070-f1a1-4ec8-bca0-84d99d99694e",
    "stack_guid": "4279d57d-de6b-4d97-bf76-02bd2f425212",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "f22aba34-249a-450b-a801-578a30f795fd",
    "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,
    "diego": false,
    "docker_image": null,
    "package_updated_at": "2015-03-20T18:27:40Z",
    "detected_start_command": "",
    "space_url": "/v2/spaces/aaf42070-f1a1-4ec8-bca0-84d99d99694e",
    "stack_url": "/v2/stacks/4279d57d-de6b-4d97-bf76-02bd2f425212",
    "events_url": "/v2/apps/6c43090d-c365-4050-98a0-92e6e59bb412/events",
    "service_bindings_url": "/v2/apps/6c43090d-c365-4050-98a0-92e6e59bb412/service_bindings",
    "routes_url": "/v2/apps/6c43090d-c365-4050-98a0-92e6e59bb412/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 53f1352b-6e26-4a5c-8709-a59e216673c3
Content-Length: 1363
X-Content-Type-Options: nosniff