Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/59a3ed63-9d24-4e7b-bf07-efb91fbe2947/routes/2b54446a-da07-4ce9-9f16-98fd5cf6baff

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2NiIsImVtYWlsIjoiZW1haWwtMTA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2NzF9.2H2ckGfr8HNe6XCd78bSARrZL7hM_lijYhS0968akvQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/59a3ed63-9d24-4e7b-bf07-efb91fbe2947/routes/2b54446a-da07-4ce9-9f16-98fd5cf6baff" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2NiIsImVtYWlsIjoiZW1haWwtMTA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2NzF9.2H2ckGfr8HNe6XCd78bSARrZL7hM_lijYhS0968akvQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "59a3ed63-9d24-4e7b-bf07-efb91fbe2947",
    "url": "/v2/apps/59a3ed63-9d24-4e7b-bf07-efb91fbe2947",
    "created_at": "2016-03-17T21:41:11Z",
    "updated_at": "2016-03-17T21:41:11Z"
  },
  "entity": {
    "name": "name-582",
    "production": false,
    "space_guid": "800f732a-80cb-44cc-b4c5-3c96dbdc9d69",
    "stack_guid": "b686738f-099c-4d15-b494-f56b61107ec1",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "1988375a-6fab-4b53-902a-35d801863f5d",
    "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-03-17T21:41:11Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "docker_credentials_json": {
      "redacted_message": "[PRIVATE DATA HIDDEN]"
    },
    "ports": null,
    "space_url": "/v2/spaces/800f732a-80cb-44cc-b4c5-3c96dbdc9d69",
    "stack_url": "/v2/stacks/b686738f-099c-4d15-b494-f56b61107ec1",
    "routes_url": "/v2/apps/59a3ed63-9d24-4e7b-bf07-efb91fbe2947/routes",
    "events_url": "/v2/apps/59a3ed63-9d24-4e7b-bf07-efb91fbe2947/events",
    "service_bindings_url": "/v2/apps/59a3ed63-9d24-4e7b-bf07-efb91fbe2947/service_bindings",
    "route_mappings_url": "/v2/apps/59a3ed63-9d24-4e7b-bf07-efb91fbe2947/route_mappings"
  }
}

Headers

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