Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/aaf387d4-2250-4620-a7d4-1ecf7415d984/routes/2696d9f6-4ab6-49b2-8c26-9b3fc3ae29de

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5NyIsImVtYWlsIjoiZW1haWwtMjY2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5Njl9.7TMwQGiiEWNDet-i4IDBSM4dUL9gGP6ri3QQCGhsgAg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/aaf387d4-2250-4620-a7d4-1ecf7415d984/routes/2696d9f6-4ab6-49b2-8c26-9b3fc3ae29de" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5NyIsImVtYWlsIjoiZW1haWwtMjY2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5Njl9.7TMwQGiiEWNDet-i4IDBSM4dUL9gGP6ri3QQCGhsgAg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "aaf387d4-2250-4620-a7d4-1ecf7415d984",
    "url": "/v2/apps/aaf387d4-2250-4620-a7d4-1ecf7415d984",
    "created_at": "2015-11-13T17:02:49Z",
    "updated_at": "2015-11-13T17:02:49Z"
  },
  "entity": {
    "name": "name-2141",
    "production": false,
    "space_guid": "b161f72b-07d2-485d-93e5-3bb2779e963e",
    "stack_guid": "790bb2f0-86cb-4881-8a16-f41ab6c61581",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "d9b67780-7b13-4f69-883a-d471d1aedbe8",
    "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-13T17:02:49Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "docker_credentials_json": {
      "redacted_message": "[PRIVATE DATA HIDDEN]"
    },
    "ports": null,
    "space_url": "/v2/spaces/b161f72b-07d2-485d-93e5-3bb2779e963e",
    "stack_url": "/v2/stacks/790bb2f0-86cb-4881-8a16-f41ab6c61581",
    "events_url": "/v2/apps/aaf387d4-2250-4620-a7d4-1ecf7415d984/events",
    "service_bindings_url": "/v2/apps/aaf387d4-2250-4620-a7d4-1ecf7415d984/service_bindings",
    "routes_url": "/v2/apps/aaf387d4-2250-4620-a7d4-1ecf7415d984/routes"
  }
}

Headers

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