Home
Version 3
Apps API

Apps API

Associate Route with the App

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

Request

Route

PUT /v2/apps/78700ffa-a50b-4276-8606-b056b77a29bf/routes/1f347177-8fed-4fa6-a47a-24d5e5d383ae

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyMyIsImVtYWlsIjoiZW1haWwtMTYzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NTB9.2u2KwFr5OP2-eMEOR7mUs9POyR6y3LRG2c__R62YVoQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/78700ffa-a50b-4276-8606-b056b77a29bf/routes/1f347177-8fed-4fa6-a47a-24d5e5d383ae" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyMyIsImVtYWlsIjoiZW1haWwtMTYzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NTB9.2u2KwFr5OP2-eMEOR7mUs9POyR6y3LRG2c__R62YVoQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "78700ffa-a50b-4276-8606-b056b77a29bf",
    "url": "/v2/apps/78700ffa-a50b-4276-8606-b056b77a29bf",
    "created_at": "2016-04-06T00:17:29Z",
    "updated_at": "2016-04-06T00:17:29Z"
  },
  "entity": {
    "name": "name-855",
    "production": false,
    "space_guid": "39409207-8eee-4084-a325-9cf44d2caaeb",
    "stack_guid": "c57aac82-9adf-439f-9d71-ae16d3fc3537",
    "buildpack": null,
    "detected_buildpack": null,
    "environment_json": null,
    "memory": 1024,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STOPPED",
    "version": "b546caf4-55fc-45e2-9757-e0e84ba8167a",
    "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-04-06T00:17:30Z",
    "detected_start_command": "",
    "enable_ssh": true,
    "docker_credentials_json": {
      "redacted_message": "[PRIVATE DATA HIDDEN]"
    },
    "ports": null,
    "space_url": "/v2/spaces/39409207-8eee-4084-a325-9cf44d2caaeb",
    "stack_url": "/v2/stacks/c57aac82-9adf-439f-9d71-ae16d3fc3537",
    "routes_url": "/v2/apps/78700ffa-a50b-4276-8606-b056b77a29bf/routes",
    "events_url": "/v2/apps/78700ffa-a50b-4276-8606-b056b77a29bf/events",
    "service_bindings_url": "/v2/apps/78700ffa-a50b-4276-8606-b056b77a29bf/service_bindings",
    "route_mappings_url": "/v2/apps/78700ffa-a50b-4276-8606-b056b77a29bf/route_mappings"
  }
}

Headers

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