Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

Assigning a droplet as a an Apps current droplet

PUT /v3/apps/:guid/current_droplet

Request

Route

PUT /v3/apps/guid-9f33c9e4-4b31-4dda-b188-adf197dbea0a/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-3b5793e7-f6c8-40cb-a8d8-07080280da83"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MyIsImVtYWlsIjoiZW1haWwtMTA3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTV9.CUQEm3sN09XI8Bin_b1vEGCCBcW884Jg7AyiP0etX7g
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-9f33c9e4-4b31-4dda-b188-adf197dbea0a/current_droplet" -d '{
  "droplet_guid": "guid-3b5793e7-f6c8-40cb-a8d8-07080280da83"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MyIsImVtYWlsIjoiZW1haWwtMTA3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTV9.CUQEm3sN09XI8Bin_b1vEGCCBcW884Jg7AyiP0etX7g" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "guid-9f33c9e4-4b31-4dda-b188-adf197dbea0a",
  "name": "name1",
  "desired_state": "STOPPED",
  "total_desired_instances": 1,
  "buildpack": null,
  "created_at": "2015-07-27T22:43:15Z",
  "updated_at": "2015-07-27T22:43:15Z",
  "environment_variables": {

  },
  "_links": {
    "self": {
      "href": "/v3/apps/guid-9f33c9e4-4b31-4dda-b188-adf197dbea0a"
    },
    "processes": {
      "href": "/v3/apps/guid-9f33c9e4-4b31-4dda-b188-adf197dbea0a/processes"
    },
    "packages": {
      "href": "/v3/apps/guid-9f33c9e4-4b31-4dda-b188-adf197dbea0a/packages"
    },
    "space": {
      "href": "/v2/spaces/7f5329b4-ab5b-404f-a0dd-6dbdedb6f742"
    },
    "droplet": {
      "href": "/v3/droplets/guid-3b5793e7-f6c8-40cb-a8d8-07080280da83"
    },
    "start": {
      "href": "/v3/apps/guid-9f33c9e4-4b31-4dda-b188-adf197dbea0a/start",
      "method": "PUT"
    },
    "stop": {
      "href": "/v3/apps/guid-9f33c9e4-4b31-4dda-b188-adf197dbea0a/stop",
      "method": "PUT"
    },
    "assign_current_droplet": {
      "href": "/v3/apps/guid-9f33c9e4-4b31-4dda-b188-adf197dbea0a/current_droplet",
      "method": "PUT"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 8e42ebb7-9073-4547-b1c1-3a02f0e0f76b
Content-Length: 1144
X-Content-Type-Options: nosniff