Home
Version 3
Droplets (Experimental) API

Droplets (Experimental) API

List all Droplets

GET /v3/droplets

Request

Route

GET /v3/droplets?page=1&per_page=2&order_by=-created_at

Parameters

Name Description Valid Values Example Values
app_guids Apps to filter by
  • app guids
  • app_guids=app_guid1,app_guid2
states Droplet state to filter by
  • PENDING
  • STAGING
  • STAGED
  • FAILED
  • EXPIRED
  • states=PENDING,STAGING
page Page to display
  • >= 1
per_page Number of results per page
  • 1-5000
order_by Value to sort by. Prepend with "+" or "-" to change sort direction to ascending or descending, respectively.
  • created_at
  • updated_at
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1MCIsImVtYWlsIjoiZW1haWwtMTgxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1Mjh9.3551HygbE_tXq4QZNLFKokeBA2Fss4PiJ1gmgXCpLmw
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/droplets?page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1MCIsImVtYWlsIjoiZW1haWwtMTgxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1Mjh9.3551HygbE_tXq4QZNLFKokeBA2Fss4PiJ1gmgXCpLmw" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-e10cc8ba-84a4-4fb1-9d10-0ad89e5fe223",
      "state": "STAGED",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-1985",
          "stack": "name-1986"
        }
      },
      "memory_limit": 123,
      "disk_limit": 456,
      "result": {
        "execution_metadata": "black-box-secrets",
        "process_types": {
          "web": "started"
        },
        "hash": {
          "type": "sha1",
          "value": "my-hash"
        },
        "buildpack": "https://github.com/cloudfoundry/detected-buildpack.git",
        "stack": null
      },
      "environment_variables": {

      },
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": "2015-11-30T23:38:47Z",
      "links": {
        "self": {
          "href": "/v3/droplets/guid-e10cc8ba-84a4-4fb1-9d10-0ad89e5fe223"
        },
        "package": {
          "href": "/v3/packages/guid-4c7ba129-1d6e-4489-8e46-bd5e9aa530ab"
        },
        "app": {
          "href": "/v3/apps/guid-9a4d2ea5-1474-4a36-8668-fae747d48428"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-9a4d2ea5-1474-4a36-8668-fae747d48428/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-83ed6060-8e67-443e-8589-571f78fbee98",
      "state": "STAGING",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-1987",
          "stack": "name-1988"
        }
      },
      "memory_limit": null,
      "disk_limit": null,
      "result": null,
      "environment_variables": {
        "yuu": "huuu"
      },
      "created_at": "1970-01-01T00:00:01Z",
      "updated_at": "2015-11-30T23:38:47Z",
      "links": {
        "self": {
          "href": "/v3/droplets/guid-83ed6060-8e67-443e-8589-571f78fbee98"
        },
        "package": {
          "href": "/v3/packages/guid-4c7ba129-1d6e-4489-8e46-bd5e9aa530ab"
        },
        "app": {
          "href": "/v3/apps/guid-9a4d2ea5-1474-4a36-8668-fae747d48428"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-9a4d2ea5-1474-4a36-8668-fae747d48428/current_droplet",
          "method": "PUT"
        },
        "buildpack": {
          "href": "/v2/buildpacks/2a3e1e67-7815-4b8a-958b-8d3501d0bc7b"
        }
      }
    }
  ]
}

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.017021
Content-Length: 2668