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.eyJ1c2VyX2lkIjoidWFhLWlkLTM1NCIsImVtYWlsIjoiZW1haWwtMjU3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNzl9.Ct1zkEV0GQOl2UGGJ3wrYKoQ2CNGwSP-qSMZRLAybmg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/apps/42071624-af82-4d90-9371-b801b972f938/routes/06caa32a-40f7-4232-9e10-0e9617b696ed

cURL

curl "https://api.[your-domain.com]/v2/apps/42071624-af82-4d90-9371-b801b972f938/routes/06caa32a-40f7-4232-9e10-0e9617b696ed" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1NCIsImVtYWlsIjoiZW1haWwtMjU3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNzl9.Ct1zkEV0GQOl2UGGJ3wrYKoQ2CNGwSP-qSMZRLAybmg" \
	-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: 17ae6385-2885-416a-9758-e6728e053b9e
Content-Length: 1343
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "42071624-af82-4d90-9371-b801b972f938",
    "url": "/v2/apps/42071624-af82-4d90-9371-b801b972f938",
    "created_at": "2015-02-10T01:42:58Z",
    "updated_at": "2015-02-10T01:42:58Z"
  },
  "entity": {
    "name": "name-1890",
    "production": false,
    "space_guid": "af190ac9-cb22-4d73-ab90-78010852d74f",
    "stack_guid": "1bd5c38a-b654-4b69-ac8b-7a19698caee3",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "da3c3fcd-ffa0-48d7-8457-b561fc1eb431",
    "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-10T01:42:58Z",
    "detected_start_command": "",
    "space_url": "/v2/spaces/af190ac9-cb22-4d73-ab90-78010852d74f",
    "stack_url": "/v2/stacks/1bd5c38a-b654-4b69-ac8b-7a19698caee3",
    "events_url": "/v2/apps/42071624-af82-4d90-9371-b801b972f938/events",
    "service_bindings_url": "/v2/apps/42071624-af82-4d90-9371-b801b972f938/service_bindings",
    "routes_url": "/v2/apps/42071624-af82-4d90-9371-b801b972f938/routes"
  }
}