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-520a7bd6-4553-46c4-88e9-c6cd873be7c2/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-ce3580aa-4119-4571-85bb-a8af5818c0f8"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2NyIsImVtYWlsIjoiZW1haWwtMzM1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NTV9.GrFDi6MKXmEO16qCSiiu_DqZEN7bO-3Vi5b74tJbeJY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-520a7bd6-4553-46c4-88e9-c6cd873be7c2/current_droplet" -d '{
  "droplet_guid": "guid-ce3580aa-4119-4571-85bb-a8af5818c0f8"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2NyIsImVtYWlsIjoiZW1haWwtMzM1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NTV9.GrFDi6MKXmEO16qCSiiu_DqZEN7bO-3Vi5b74tJbeJY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "guid-520a7bd6-4553-46c4-88e9-c6cd873be7c2",
  "name": "name1",
  "desired_state": "STOPPED",
  "total_desired_instances": 1,
  "buildpack": null,
  "created_at": "2015-09-11T18:39:15Z",
  "updated_at": "2015-09-11T18:39:15Z",
  "environment_variables": {

  },
  "_links": {
    "self": {
      "href": "/v3/apps/guid-520a7bd6-4553-46c4-88e9-c6cd873be7c2"
    },
    "space": {
      "href": "/v2/spaces/76bef8f1-d2f3-4105-aa06-d2e45559cfd9"
    },
    "processes": {
      "href": "/v3/apps/guid-520a7bd6-4553-46c4-88e9-c6cd873be7c2/processes"
    },
    "routes": {
      "href": "/v3/apps/guid-520a7bd6-4553-46c4-88e9-c6cd873be7c2/routes"
    },
    "packages": {
      "href": "/v3/apps/guid-520a7bd6-4553-46c4-88e9-c6cd873be7c2/packages"
    },
    "droplet": {
      "href": "/v3/droplets/guid-ce3580aa-4119-4571-85bb-a8af5818c0f8"
    },
    "droplets": {
      "href": "/v3/apps/guid-520a7bd6-4553-46c4-88e9-c6cd873be7c2/droplets"
    },
    "start": {
      "href": "/v3/apps/guid-520a7bd6-4553-46c4-88e9-c6cd873be7c2/start",
      "method": "PUT"
    },
    "stop": {
      "href": "/v3/apps/guid-520a7bd6-4553-46c4-88e9-c6cd873be7c2/stop",
      "method": "PUT"
    },
    "assign_current_droplet": {
      "href": "/v3/apps/guid-520a7bd6-4553-46c4-88e9-c6cd873be7c2/current_droplet",
      "method": "PUT"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ccece0ff-8faa-40fa-aab7-4d7cde1c3729
Content-Length: 1342
X-Content-Type-Options: nosniff