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&order_direction=asc

Parameters

Name Description Valid Values Example Values
app_guids Apps to filter by
  • array of strings
  • app_guids[]=app_guid1&app_guids[]=app_guid2
state Droplet state to filter by
  • array of strings
  • states[]=pending&states[]=staging
page Page to display
  • >= 1
per_page Number of results per page
  • 1-5000
order_by Value to sort by
  • created_at, updated_at
order_direction Direction to sort by
  • asc, desc
page: 1
per_page: 2
order_by: created_at
order_direction: asc

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExMyIsImVtYWlsIjoiZW1haWwtODdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzOTQyNjE5N30.GAo7v3tAq5cEjoLnUbImZQYl_uIkzYRC_nOUrSdZ4k8
Host: example.org
Cookie: 

cURL

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

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/droplets?order_by=created_at&order_direction=asc&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/droplets?order_by=created_at&order_direction=asc&page=1&per_page=2"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-0227292d-7f34-425f-ae23-d0d8dbd72a90",
      "state": "STAGING",
      "hash": {
        "type": "sha1",
        "value": null
      },
      "buildpack": "name-416",
      "error": null,
      "procfile": null,
      "environment_variables": {
        "yuu": "huuu"
      },
      "created_at": "1970-01-01T00:00:01Z",
      "updated_at": null,
      "_links": {
        "self": {
          "href": "/v3/droplets/guid-0227292d-7f34-425f-ae23-d0d8dbd72a90"
        },
        "package": {
          "href": "/v3/packages/guid-cfbd6968-a89a-4505-8e78-dde581d6d472"
        },
        "app": {
          "href": "/v3/apps/guid-2ba466b9-e206-42da-92f4-086e4a235a1c"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-2ba466b9-e206-42da-92f4-086e4a235a1c/current_droplet",
          "method": "PUT"
        },
        "buildpack": {
          "href": "/v2/buildpacks/68b42e0d-6eb5-470f-8a29-b9550d33867b"
        }
      }
    },
    {
      "guid": "guid-2abd0280-fd26-4381-a2fb-f169b15ed980",
      "state": "STAGED",
      "hash": {
        "type": "sha1",
        "value": "my-hash"
      },
      "buildpack": "https://github.com/cloudfoundry/my-buildpack.git",
      "error": null,
      "procfile": null,
      "environment_variables": {

      },
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": null,
      "_links": {
        "self": {
          "href": "/v3/droplets/guid-2abd0280-fd26-4381-a2fb-f169b15ed980"
        },
        "package": {
          "href": "/v3/packages/guid-cfbd6968-a89a-4505-8e78-dde581d6d472"
        },
        "app": {
          "href": "/v3/apps/guid-2ba466b9-e206-42da-92f4-086e4a235a1c"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-2ba466b9-e206-42da-92f4-086e4a235a1c/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 302aa745-623f-4266-8df9-41ee3ee67a56
Content-Length: 2205
X-Content-Type-Options: nosniff