Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/1f2bec0f-3dd1-4989-af5e-a9ea9ce7891e/routes/fefabbe2-9fe3-4cae-878b-97da4cf8971a

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwNCIsImVtYWlsIjoiZW1haWwtMjcyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NTl9.ot58JdGcaI4whgisJ8G390sqXG-xKvjwPPMeE9nzDX4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/1f2bec0f-3dd1-4989-af5e-a9ea9ce7891e/routes/fefabbe2-9fe3-4cae-878b-97da4cf8971a" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwNCIsImVtYWlsIjoiZW1haWwtMjcyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NTl9.ot58JdGcaI4whgisJ8G390sqXG-xKvjwPPMeE9nzDX4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "1f2bec0f-3dd1-4989-af5e-a9ea9ce7891e",
    "url": "/v2/apps/1f2bec0f-3dd1-4989-af5e-a9ea9ce7891e",
    "created_at": "2015-09-30T23:30:58Z",
    "updated_at": "2015-09-30T23:30:58Z"
  },
  "entity": {
    "name": "name-2158",
    "production": false,
    "space_guid": "bcf2ca7a-9cb2-4036-be7e-5e81cdd44d40",
    "stack_guid": "ce01d699-f4e5-45d9-b65b-9ee636b7042f",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "d23fbe98-34ff-4e07-b8cd-1a80a221d20f",
    "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": "2015-09-30T23:30:58Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "docker_credentials_json": {
      "redacted_message": "[PRIVATE DATA HIDDEN]"
    },
    "space_url": "/v2/spaces/bcf2ca7a-9cb2-4036-be7e-5e81cdd44d40",
    "stack_url": "/v2/stacks/ce01d699-f4e5-45d9-b65b-9ee636b7042f",
    "events_url": "/v2/apps/1f2bec0f-3dd1-4989-af5e-a9ea9ce7891e/events",
    "service_bindings_url": "/v2/apps/1f2bec0f-3dd1-4989-af5e-a9ea9ce7891e/service_bindings",
    "routes_url": "/v2/apps/1f2bec0f-3dd1-4989-af5e-a9ea9ce7891e/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 51baafb9-4fa5-413e-8cc6-09c28b91b3a7
Content-Length: 1517
X-Content-Type-Options: nosniff