Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/02addb78-c691-4da1-9b7f-611be8f2495b/routes/9bb25627-37e2-45fc-8ed9-e352183465c4

Parameters

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

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEyNSIsImVtYWlsIjoiZW1haWwtMTA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzQ5ODR9.6zguI_moS9w-kVOX-9KnrZ5bUCyo48-LXWdT08m87fI
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/02addb78-c691-4da1-9b7f-611be8f2495b/routes/9bb25627-37e2-45fc-8ed9-e352183465c4" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEyNSIsImVtYWlsIjoiZW1haWwtMTA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzQ5ODR9.6zguI_moS9w-kVOX-9KnrZ5bUCyo48-LXWdT08m87fI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "02addb78-c691-4da1-9b7f-611be8f2495b",
    "url": "/v2/apps/02addb78-c691-4da1-9b7f-611be8f2495b",
    "created_at": "2015-05-21T01:03:04Z",
    "updated_at": "2015-05-21T01:03:04Z"
  },
  "entity": {
    "name": "name-421",
    "production": false,
    "space_guid": "1a13a6c0-db55-4918-9c0f-22270bda9a9d",
    "stack_guid": "057b62d7-eb86-4278-a0db-cd8a09e1db12",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "2a493e3d-89b6-4ea6-8e67-909f0b095fef",
    "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,
    "diego": false,
    "docker_image": null,
    "package_updated_at": "2015-05-21T01:03:04Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "space_url": "/v2/spaces/1a13a6c0-db55-4918-9c0f-22270bda9a9d",
    "stack_url": "/v2/stacks/057b62d7-eb86-4278-a0db-cd8a09e1db12",
    "events_url": "/v2/apps/02addb78-c691-4da1-9b7f-611be8f2495b/events",
    "service_bindings_url": "/v2/apps/02addb78-c691-4da1-9b7f-611be8f2495b/service_bindings",
    "routes_url": "/v2/apps/02addb78-c691-4da1-9b7f-611be8f2495b/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c334942f-eeb7-4ccd-ae0b-26dd68b01642
Content-Length: 1386
X-Content-Type-Options: nosniff