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-2caae452-4204-40b1-a43d-aac2908d76a7/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-56d8f9d8-dc71-4637-bfc7-fb1f44138f75"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzNCIsImVtYWlsIjoiZW1haWwtODBAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0MTY2MjU5OX0.czFIhrSXH3303SFBIGYVt6dkrrztN_px9-T1InIOBv0
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-2caae452-4204-40b1-a43d-aac2908d76a7/current_droplet" -d '{
  "droplet_guid": "guid-56d8f9d8-dc71-4637-bfc7-fb1f44138f75"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzNCIsImVtYWlsIjoiZW1haWwtODBAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0MTY2MjU5OX0.czFIhrSXH3303SFBIGYVt6dkrrztN_px9-T1InIOBv0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "guid-2caae452-4204-40b1-a43d-aac2908d76a7",
  "name": "name1",
  "desired_state": "STOPPED",
  "total_desired_instances": 1,
  "buildpack": null,
  "created_at": "2015-08-31T21:49:59Z",
  "updated_at": "2015-08-31T21:49:59Z",
  "environment_variables": {

  },
  "_links": {
    "self": {
      "href": "/v3/apps/guid-2caae452-4204-40b1-a43d-aac2908d76a7"
    },
    "space": {
      "href": "/v2/spaces/bca6ea58-78fb-438b-a0a8-b84cab89136a"
    },
    "processes": {
      "href": "/v3/apps/guid-2caae452-4204-40b1-a43d-aac2908d76a7/processes"
    },
    "routes": {
      "href": "/v3/apps/guid-2caae452-4204-40b1-a43d-aac2908d76a7/routes"
    },
    "packages": {
      "href": "/v3/apps/guid-2caae452-4204-40b1-a43d-aac2908d76a7/packages"
    },
    "droplet": {
      "href": "/v3/droplets/guid-56d8f9d8-dc71-4637-bfc7-fb1f44138f75"
    },
    "droplets": {
      "href": "/v3/apps/guid-2caae452-4204-40b1-a43d-aac2908d76a7/droplets"
    },
    "start": {
      "href": "/v3/apps/guid-2caae452-4204-40b1-a43d-aac2908d76a7/start",
      "method": "PUT"
    },
    "stop": {
      "href": "/v3/apps/guid-2caae452-4204-40b1-a43d-aac2908d76a7/stop",
      "method": "PUT"
    },
    "assign_current_droplet": {
      "href": "/v3/apps/guid-2caae452-4204-40b1-a43d-aac2908d76a7/current_droplet",
      "method": "PUT"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d973e367-6c7a-4293-8370-a838a687ae54
Content-Length: 1342
X-Content-Type-Options: nosniff