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-740d8270-0f56-431e-af87-c4de8524b129/current_droplet

Parameters

Name Description Valid Values Example Values
desired_droplet_guid GUID of the Staged Droplet to be used for the App

Body

Name Description Default Valid Values Example Values
{
  "desired_droplet_guid": "guid-7da3c70b-5621-4954-a16f-8c73cd67af5b"
}

Headers

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

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-740d8270-0f56-431e-af87-c4de8524b129/current_droplet" -d '{
  "desired_droplet_guid": "guid-7da3c70b-5621-4954-a16f-8c73cd67af5b"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NiIsImVtYWlsIjoiZW1haWwtMTYzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMTF9.KVmtDiriMvV9oo9RMqISKk9iAZ_1TEK2hiRBwlaaHAc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "guid-740d8270-0f56-431e-af87-c4de8524b129",
  "name": "name1",
  "desired_state": "STOPPED",
  "total_desired_instances": 1,
  "created_at": "2015-06-04T00:05:11Z",
  "updated_at": "2015-06-04T00:05:11Z",
  "environment_variables": {

  },
  "_links": {
    "self": {
      "href": "/v3/apps/guid-740d8270-0f56-431e-af87-c4de8524b129"
    },
    "processes": {
      "href": "/v3/apps/guid-740d8270-0f56-431e-af87-c4de8524b129/processes"
    },
    "packages": {
      "href": "/v3/apps/guid-740d8270-0f56-431e-af87-c4de8524b129/packages"
    },
    "space": {
      "href": "/v2/spaces/f6dffe2c-75aa-4602-ae30-5214bc53c0f9"
    },
    "desired_droplet": {
      "href": "/v3/droplets/guid-7da3c70b-5621-4954-a16f-8c73cd67af5b"
    },
    "start": {
      "href": "/v3/apps/guid-740d8270-0f56-431e-af87-c4de8524b129/start",
      "method": "PUT"
    },
    "stop": {
      "href": "/v3/apps/guid-740d8270-0f56-431e-af87-c4de8524b129/stop",
      "method": "PUT"
    },
    "assign_current_droplet": {
      "href": "/v3/apps/guid-740d8270-0f56-431e-af87-c4de8524b129/current_droplet",
      "method": "PUT"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 48a79513-06b4-461e-8a3c-12746830fb21
Content-Length: 1131
X-Content-Type-Options: nosniff