Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/027f33e2-7f6a-415b-9aea-4e66da8f8e81/routes/9b5a844e-513b-44de-bf72-bae7994034ab

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTc5IiwiZW1haWwiOiJlbWFpbC00N0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU0NDUxNjEwfQ.nuwacHNSA9vYpG7dp8ZFM-8brFAFJ5OXhDkoGMaKfxY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/027f33e2-7f6a-415b-9aea-4e66da8f8e81/routes/9b5a844e-513b-44de-bf72-bae7994034ab" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTc5IiwiZW1haWwiOiJlbWFpbC00N0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU0NDUxNjEwfQ.nuwacHNSA9vYpG7dp8ZFM-8brFAFJ5OXhDkoGMaKfxY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "027f33e2-7f6a-415b-9aea-4e66da8f8e81",
    "url": "/v2/apps/027f33e2-7f6a-415b-9aea-4e66da8f8e81",
    "created_at": "2016-01-26T22:20:10Z",
    "updated_at": "2016-01-26T22:20:10Z"
  },
  "entity": {
    "name": "name-346",
    "production": false,
    "space_guid": "5659262e-15f9-4e14-90f9-ae74eea89736",
    "stack_guid": "7ef81877-ac3b-4f9c-b525-2a32f3d9014f",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "a3b7b926-ae0e-4fb7-959c-924683c367fd",
    "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": "2016-01-26T22:20:10Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "docker_credentials_json": {
      "redacted_message": "[PRIVATE DATA HIDDEN]"
    },
    "ports": null,
    "space_url": "/v2/spaces/5659262e-15f9-4e14-90f9-ae74eea89736",
    "stack_url": "/v2/stacks/7ef81877-ac3b-4f9c-b525-2a32f3d9014f",
    "events_url": "/v2/apps/027f33e2-7f6a-415b-9aea-4e66da8f8e81/events",
    "service_bindings_url": "/v2/apps/027f33e2-7f6a-415b-9aea-4e66da8f8e81/service_bindings",
    "routes_url": "/v2/apps/027f33e2-7f6a-415b-9aea-4e66da8f8e81/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 1535
X-Content-Type-Options: nosniff