Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

Assigning a droplet as an App's current droplet

PUT /v3/apps/:guid/current_droplet

Request

Route

PUT /v3/apps/guid-149c1f0e-714b-4b6d-8415-e1e6efdefc03/current_droplet

Body

Name Description Default Valid Values Example Values
droplet_guid GUID of the Staged Droplet to be used for the App
{
  "droplet_guid": "guid-4510f70a-c1be-44c2-a9cb-615c5836a11d"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxMyIsImVtYWlsIjoiZW1haWwtMTQ1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMDZ9.GuA-RE55jOy0sktBTECCuXlm99Qxu6xvBnNOTeataHw
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-149c1f0e-714b-4b6d-8415-e1e6efdefc03/current_droplet" -d '{
  "droplet_guid": "guid-4510f70a-c1be-44c2-a9cb-615c5836a11d"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxMyIsImVtYWlsIjoiZW1haWwtMTQ1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMDZ9.GuA-RE55jOy0sktBTECCuXlm99Qxu6xvBnNOTeataHw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "guid-149c1f0e-714b-4b6d-8415-e1e6efdefc03",
  "name": "name1",
  "desired_state": "STOPPED",
  "total_desired_instances": 1,
  "buildpack": null,
  "created_at": "2015-10-13T17:31:46Z",
  "updated_at": "2015-10-13T17:31:46Z",
  "environment_variables": {

  },
  "links": {
    "self": {
      "href": "/v3/apps/guid-149c1f0e-714b-4b6d-8415-e1e6efdefc03"
    },
    "space": {
      "href": "/v2/spaces/13a6c8a0-e090-45ef-9efa-c1cd25b8df66"
    },
    "processes": {
      "href": "/v3/apps/guid-149c1f0e-714b-4b6d-8415-e1e6efdefc03/processes"
    },
    "routes": {
      "href": "/v3/apps/guid-149c1f0e-714b-4b6d-8415-e1e6efdefc03/routes"
    },
    "packages": {
      "href": "/v3/apps/guid-149c1f0e-714b-4b6d-8415-e1e6efdefc03/packages"
    },
    "droplet": {
      "href": "/v3/droplets/guid-4510f70a-c1be-44c2-a9cb-615c5836a11d"
    },
    "droplets": {
      "href": "/v3/apps/guid-149c1f0e-714b-4b6d-8415-e1e6efdefc03/droplets"
    },
    "start": {
      "href": "/v3/apps/guid-149c1f0e-714b-4b6d-8415-e1e6efdefc03/start",
      "method": "PUT"
    },
    "stop": {
      "href": "/v3/apps/guid-149c1f0e-714b-4b6d-8415-e1e6efdefc03/stop",
      "method": "PUT"
    },
    "assign_current_droplet": {
      "href": "/v3/apps/guid-149c1f0e-714b-4b6d-8415-e1e6efdefc03/current_droplet",
      "method": "PUT"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 53a0c65c-c44a-4b0a-8141-b30b7fb65cd6
Content-Length: 1341
X-Content-Type-Options: nosniff