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-04a92e7b-87be-4cfd-8a5b-66183fe4dceb/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-40970932-cf6a-4f62-a3be-77fa32eba1e2"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2OCIsImVtYWlsIjoiZW1haWwtMjcxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTM4MzcyODN9.bTWyIYbk6sdWd0p_88p85Pt-gLBs4iiK4vKg89kx1Lc
Content-Type: application/json
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-04a92e7b-87be-4cfd-8a5b-66183fe4dceb/current_droplet" -d '{
  "droplet_guid": "guid-40970932-cf6a-4f62-a3be-77fa32eba1e2"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2OCIsImVtYWlsIjoiZW1haWwtMjcxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTM4MzcyODN9.bTWyIYbk6sdWd0p_88p85Pt-gLBs4iiK4vKg89kx1Lc" \
	-H "Content-Type: application/json" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "guid-04a92e7b-87be-4cfd-8a5b-66183fe4dceb",
  "name": "name1",
  "desired_state": "STOPPED",
  "total_desired_instances": 1,
  "created_at": "2016-01-19T19:41:22Z",
  "updated_at": "2016-01-19T19:41:23Z",
  "lifecycle": {
    "type": "buildpack",
    "data": {
      "buildpack": "name-2392",
      "stack": "name-2393"
    }
  },
  "environment_variables": {

  },
  "links": {
    "self": {
      "href": "/v3/apps/guid-04a92e7b-87be-4cfd-8a5b-66183fe4dceb"
    },
    "space": {
      "href": "/v2/spaces/13d8dee6-a340-4e8b-9b6c-802fac806f9a"
    },
    "processes": {
      "href": "/v3/apps/guid-04a92e7b-87be-4cfd-8a5b-66183fe4dceb/processes"
    },
    "routes": {
      "href": "/v3/apps/guid-04a92e7b-87be-4cfd-8a5b-66183fe4dceb/routes"
    },
    "packages": {
      "href": "/v3/apps/guid-04a92e7b-87be-4cfd-8a5b-66183fe4dceb/packages"
    },
    "droplet": {
      "href": "/v3/droplets/guid-40970932-cf6a-4f62-a3be-77fa32eba1e2"
    },
    "droplets": {
      "href": "/v3/apps/guid-04a92e7b-87be-4cfd-8a5b-66183fe4dceb/droplets"
    },
    "start": {
      "href": "/v3/apps/guid-04a92e7b-87be-4cfd-8a5b-66183fe4dceb/start",
      "method": "PUT"
    },
    "stop": {
      "href": "/v3/apps/guid-04a92e7b-87be-4cfd-8a5b-66183fe4dceb/stop",
      "method": "PUT"
    },
    "assign_current_droplet": {
      "href": "/v3/apps/guid-04a92e7b-87be-4cfd-8a5b-66183fe4dceb/current_droplet",
      "method": "PUT"
    }
  }
}

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
X-Runtime: 0.044542
Content-Length: 1446