Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/71bb17f7-4377-4d96-9494-45c194614ce5/routes/8333749f-4b8a-493c-ad64-3d213354bbb6

Parameters

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

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/71bb17f7-4377-4d96-9494-45c194614ce5/routes/8333749f-4b8a-493c-ad64-3d213354bbb6" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTU4IiwiZW1haWwiOiJlbWFpbC01OEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDM5NDI2MTk1fQ.Jdfc6KbBIssQB_caXvCfTZ80sg_nlt5V25dv9rJ5PR8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "71bb17f7-4377-4d96-9494-45c194614ce5",
    "url": "/v2/apps/71bb17f7-4377-4d96-9494-45c194614ce5",
    "created_at": "2015-08-06T00:36:35Z",
    "updated_at": "2015-08-06T00:36:35Z"
  },
  "entity": {
    "name": "name-334",
    "production": false,
    "space_guid": "c0872235-912e-49fc-9d06-378f97542d0d",
    "stack_guid": "18094aa8-503f-4d4a-8931-20a31d21d58b",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "a767216e-e1cb-41be-a277-11e0e83dc233",
    "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-08-06T00:36:35Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "docker_credentials_json": {
      "redacted_message": "[PRIVATE DATA HIDDEN]"
    },
    "space_url": "/v2/spaces/c0872235-912e-49fc-9d06-378f97542d0d",
    "stack_url": "/v2/stacks/18094aa8-503f-4d4a-8931-20a31d21d58b",
    "events_url": "/v2/apps/71bb17f7-4377-4d96-9494-45c194614ce5/events",
    "service_bindings_url": "/v2/apps/71bb17f7-4377-4d96-9494-45c194614ce5/service_bindings",
    "routes_url": "/v2/apps/71bb17f7-4377-4d96-9494-45c194614ce5/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6d8831ef-4265-4e44-84f1-ca0c8e370b1f
Content-Length: 1516
X-Content-Type-Options: nosniff