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
  • 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.eyJ1c2VyX2lkIjoidWFhLWlkLTE1OCIsImVtYWlsIjoiZW1haWwtOTBAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NDI2MDY0MX0.lCGUsjeS9SnyK_ORMmZbuYa9A6WO542BnT39OijD55s
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.eyJ1c2VyX2lkIjoidWFhLWlkLTE1OCIsImVtYWlsIjoiZW1haWwtOTBAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NDI2MDY0MX0.lCGUsjeS9SnyK_ORMmZbuYa9A6WO542BnT39OijD55s" \
	-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-59fa3b8d-5f85-492d-b9fe-ff2e3527d4a4",
      "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-59fa3b8d-5f85-492d-b9fe-ff2e3527d4a4"
        },
        "package": {
          "href": "/v3/packages/guid-fb3ad231-c418-40b3-9178-86ead25cdb19"
        },
        "app": {
          "href": "/v3/apps/guid-746a557a-ec88-4b2a-85cc-81199e9b7d79"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-746a557a-ec88-4b2a-85cc-81199e9b7d79/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-e5a037fb-f09f-4080-913a-0d9a56a2ccd5",
      "state": "STAGING",
      "hash": {
        "type": "sha1",
        "value": null
      },
      "buildpack": "name-1238",
      "error": null,
      "procfile": null,
      "environment_variables": {
        "yuu": "huuu"
      },
      "created_at": "1970-01-01T00:00:01Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/droplets/guid-e5a037fb-f09f-4080-913a-0d9a56a2ccd5"
        },
        "package": {
          "href": "/v3/packages/guid-fb3ad231-c418-40b3-9178-86ead25cdb19"
        },
        "app": {
          "href": "/v3/apps/guid-746a557a-ec88-4b2a-85cc-81199e9b7d79"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-746a557a-ec88-4b2a-85cc-81199e9b7d79/current_droplet",
          "method": "PUT"
        },
        "buildpack": {
          "href": "/v2/buildpacks/30efe845-0a0e-42c2-b47f-51f064bc49b8"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d3e0ef4f-bd1b-4e3d-a8a0-4a896ae350be
Content-Length: 2166
X-Content-Type-Options: nosniff