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-f5c05472-1ef4-4a6b-99e4-011b4fb05abf/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-42a6b9cb-6d5a-45ea-8e89-6b62764a6a70"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0MyIsImVtYWlsIjoiZW1haWwtMzEwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NzR9.ZdxWZuaUQRGYK_U3-9GRlL5Tfm_X0D4sXUIxQyyjjPQ
Content-Type: application/json
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-f5c05472-1ef4-4a6b-99e4-011b4fb05abf/current_droplet" -d '{
  "droplet_guid": "guid-42a6b9cb-6d5a-45ea-8e89-6b62764a6a70"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0MyIsImVtYWlsIjoiZW1haWwtMzEwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NzR9.ZdxWZuaUQRGYK_U3-9GRlL5Tfm_X0D4sXUIxQyyjjPQ" \
	-H "Content-Type: application/json" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "guid-f5c05472-1ef4-4a6b-99e4-011b4fb05abf",
  "name": "name1",
  "desired_state": "STOPPED",
  "total_desired_instances": 1,
  "created_at": "2015-11-13T17:02:54Z",
  "updated_at": "2015-11-13T17:02:55Z",
  "lifecycle": {
    "type": "buildpack",
    "data": {
      "buildpack": "name-2449",
      "stack": "name-2450"
    }
  },
  "environment_variables": {

  },
  "links": {
    "self": {
      "href": "/v3/apps/guid-f5c05472-1ef4-4a6b-99e4-011b4fb05abf"
    },
    "space": {
      "href": "/v2/spaces/1ac5da11-3b99-4ec5-8261-7b9104142327"
    },
    "processes": {
      "href": "/v3/apps/guid-f5c05472-1ef4-4a6b-99e4-011b4fb05abf/processes"
    },
    "routes": {
      "href": "/v3/apps/guid-f5c05472-1ef4-4a6b-99e4-011b4fb05abf/routes"
    },
    "packages": {
      "href": "/v3/apps/guid-f5c05472-1ef4-4a6b-99e4-011b4fb05abf/packages"
    },
    "droplet": {
      "href": "/v3/droplets/guid-42a6b9cb-6d5a-45ea-8e89-6b62764a6a70"
    },
    "droplets": {
      "href": "/v3/apps/guid-f5c05472-1ef4-4a6b-99e4-011b4fb05abf/droplets"
    },
    "start": {
      "href": "/v3/apps/guid-f5c05472-1ef4-4a6b-99e4-011b4fb05abf/start",
      "method": "PUT"
    },
    "stop": {
      "href": "/v3/apps/guid-f5c05472-1ef4-4a6b-99e4-011b4fb05abf/stop",
      "method": "PUT"
    },
    "assign_current_droplet": {
      "href": "/v3/apps/guid-f5c05472-1ef4-4a6b-99e4-011b4fb05abf/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.044981
Content-Length: 1446