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.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MCIsImVtYWlsIjoiZW1haWwtMjIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxMzl9._Uw48PLsaxSHyy5wFWo9F-nxxryb27HRgwQJIFjDoKQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/apps/411751d2-b7eb-4732-8753-4eed159086cd/routes/dcb76787-6120-47df-93e8-c17e1369ff57

cURL

curl "https://api.[your-domain.com]/v2/apps/411751d2-b7eb-4732-8753-4eed159086cd/routes/dcb76787-6120-47df-93e8-c17e1369ff57" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MCIsImVtYWlsIjoiZW1haWwtMjIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxMzl9._Uw48PLsaxSHyy5wFWo9F-nxxryb27HRgwQJIFjDoKQ" \
	-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: 98e6071a-6797-49b9-b183-618773636188
Content-Length: 1343
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "411751d2-b7eb-4732-8753-4eed159086cd",
    "url": "/v2/apps/411751d2-b7eb-4732-8753-4eed159086cd",
    "created_at": "2015-02-12T01:42:18Z",
    "updated_at": "2015-02-12T01:42:18Z"
  },
  "entity": {
    "name": "name-1794",
    "production": false,
    "space_guid": "822cc430-1278-47b9-a136-e9d1f3ea56ff",
    "stack_guid": "6c9c3ba9-40f5-4aef-8599-c43f186df132",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "711cba6d-5f2a-4ff7-85b5-47a6a4e5ee7c",
    "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-02-12T01:42:18Z",
    "detected_start_command": "",
    "space_url": "/v2/spaces/822cc430-1278-47b9-a136-e9d1f3ea56ff",
    "stack_url": "/v2/stacks/6c9c3ba9-40f5-4aef-8599-c43f186df132",
    "events_url": "/v2/apps/411751d2-b7eb-4732-8753-4eed159086cd/events",
    "service_bindings_url": "/v2/apps/411751d2-b7eb-4732-8753-4eed159086cd/service_bindings",
    "routes_url": "/v2/apps/411751d2-b7eb-4732-8753-4eed159086cd/routes"
  }
}