Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Fields

Name Description Default Valid Values Example Values

Parameters

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

Request

Headers

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

Route

PUT /v2/apps/29590b8f-da78-48f4-b7ba-4cde2a68f06e/routes/2f545013-5e51-4157-ad41-1942c9f5495f

cURL

curl "https://api.[your-domain.com]/v2/apps/29590b8f-da78-48f4-b7ba-4cde2a68f06e/routes/2f545013-5e51-4157-ad41-1942c9f5495f" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3OCIsImVtYWlsIjoiZW1haWwtMjE4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4ODB9.Spwn81KkkQ2gX7QY00qWUi2gAAPUK3s2mVlKY9HG9mQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 07444643-fd0d-4adb-8914-b542bcd55371
Content-Length: 1343
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "29590b8f-da78-48f4-b7ba-4cde2a68f06e",
    "url": "/v2/apps/29590b8f-da78-48f4-b7ba-4cde2a68f06e",
    "created_at": "2015-01-27T19:14:40Z",
    "updated_at": "2015-01-27T19:14:40Z"
  },
  "entity": {
    "name": "name-1641",
    "production": false,
    "space_guid": "45778e18-b07d-43df-bd15-09db91095cda",
    "stack_guid": "02217159-6eec-4232-ac7c-6c345c150407",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "2e14ae2b-b5c6-4f80-b8e2-efccad69001f",
    "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,
    "docker_image": null,
    "package_updated_at": "2015-01-27T19:14:40Z",
    "detected_start_command": "",
    "space_url": "/v2/spaces/45778e18-b07d-43df-bd15-09db91095cda",
    "stack_url": "/v2/stacks/02217159-6eec-4232-ac7c-6c345c150407",
    "events_url": "/v2/apps/29590b8f-da78-48f4-b7ba-4cde2a68f06e/events",
    "service_bindings_url": "/v2/apps/29590b8f-da78-48f4-b7ba-4cde2a68f06e/service_bindings",
    "routes_url": "/v2/apps/29590b8f-da78-48f4-b7ba-4cde2a68f06e/routes"
  }
}