Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/10d1b018-c1bc-4180-9053-0e2c393a384f/routes/c1ea85df-bf28-4d29-b23c-69af3ffa12ec

Parameters

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

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/10d1b018-c1bc-4180-9053-0e2c393a384f/routes/c1ea85df-bf28-4d29-b23c-69af3ffa12ec" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1IiwiZW1haWwiOiJlbWFpbC0zNEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ3MTE2ODI5fQ.aXxjecJ0CRo8GQWlRgoTdbH7PMgFcrmUBGMhVJIZ3fI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "10d1b018-c1bc-4180-9053-0e2c393a384f",
    "url": "/v2/apps/10d1b018-c1bc-4180-9053-0e2c393a384f",
    "created_at": "2015-11-03T00:53:49Z",
    "updated_at": "2015-11-03T00:53:49Z"
  },
  "entity": {
    "name": "name-366",
    "production": false,
    "space_guid": "1b70bdd7-e90d-4449-953f-10682fe152c7",
    "stack_guid": "08a97ed6-2595-440c-879e-b78f0790f223",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "ca76e922-9e58-400b-a867-9ca7462892b2",
    "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-11-03T00:53:49Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "docker_credentials_json": {
      "redacted_message": "[PRIVATE DATA HIDDEN]"
    },
    "ports": null,
    "space_url": "/v2/spaces/1b70bdd7-e90d-4449-953f-10682fe152c7",
    "stack_url": "/v2/stacks/08a97ed6-2595-440c-879e-b78f0790f223",
    "events_url": "/v2/apps/10d1b018-c1bc-4180-9053-0e2c393a384f/events",
    "service_bindings_url": "/v2/apps/10d1b018-c1bc-4180-9053-0e2c393a384f/service_bindings",
    "routes_url": "/v2/apps/10d1b018-c1bc-4180-9053-0e2c393a384f/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 72fd6e24-8122-49f3-9149-4fb2322486a6
Content-Length: 1535
X-Content-Type-Options: nosniff