Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/98803952-d119-443c-bd26-79e640705019/routes/db2322bd-001c-4991-a4db-39e4275885d8

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzOSIsImVtYWlsIjoiZW1haWwtMjMwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3MjN9.v3Y89eVLfaY-eygVfyIvH2_wdJQbn_RAAx4QyXCBNQ4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/98803952-d119-443c-bd26-79e640705019/routes/db2322bd-001c-4991-a4db-39e4275885d8" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzOSIsImVtYWlsIjoiZW1haWwtMjMwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3MjN9.v3Y89eVLfaY-eygVfyIvH2_wdJQbn_RAAx4QyXCBNQ4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "98803952-d119-443c-bd26-79e640705019",
    "url": "/v2/apps/98803952-d119-443c-bd26-79e640705019",
    "created_at": "2016-05-12T00:45:22Z",
    "updated_at": "2016-05-12T00:45:22Z"
  },
  "entity": {
    "name": "name-1924",
    "production": false,
    "space_guid": "16e53b7f-8323-4bd5-ade4-ade3bb7dd0aa",
    "stack_guid": "5c773647-fccf-477d-85df-61ef6e576e7f",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "6c64c908-7dd4-4817-8a9b-9d5684a6e063",
    "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-05-12T00:45:23Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "docker_credentials_json": {
      "redacted_message": "[PRIVATE DATA HIDDEN]"
    },
    "ports": null,
    "space_url": "/v2/spaces/16e53b7f-8323-4bd5-ade4-ade3bb7dd0aa",
    "stack_url": "/v2/stacks/5c773647-fccf-477d-85df-61ef6e576e7f",
    "routes_url": "/v2/apps/98803952-d119-443c-bd26-79e640705019/routes",
    "events_url": "/v2/apps/98803952-d119-443c-bd26-79e640705019/events",
    "service_bindings_url": "/v2/apps/98803952-d119-443c-bd26-79e640705019/service_bindings",
    "route_mappings_url": "/v2/apps/98803952-d119-443c-bd26-79e640705019/route_mappings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d6965193-e5a7-4091-8fa2-cb8aa85a5341
Content-Length: 1626
X-Content-Type-Options: nosniff