Home
Version 3
Droplets (Experimental) API

Droplets (Experimental) API

Filters Droplets by states, app_guids

GET /v3/droplets

Request

Route

GET /v3/droplets?app_guids=guid-486e7467-e1c9-4688-bc21-4de194e5d332&states=STAGED%2CFAILED&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
app_guids: guid-486e7467-e1c9-4688-bc21-4de194e5d332
states: STAGED,FAILED
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1OSIsImVtYWlsIjoiZW1haWwtOTFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NDI2MDY0MX0._nf2vlf6QvwXEQL3C8mLZ9MDwcXvkpmMQOC15Cqwwxg
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/droplets?app_guids=guid-486e7467-e1c9-4688-bc21-4de194e5d332&states=STAGED%2CFAILED&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1OSIsImVtYWlsIjoiZW1haWwtOTFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NDI2MDY0MX0._nf2vlf6QvwXEQL3C8mLZ9MDwcXvkpmMQOC15Cqwwxg" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/droplets?app_guids=guid-486e7467-e1c9-4688-bc21-4de194e5d332&order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
    },
    "last": {
      "href": "/v3/droplets?app_guids=guid-486e7467-e1c9-4688-bc21-4de194e5d332&order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-01c6781f-55bb-4d67-af6a-3ad84310f632",
      "state": "FAILED",
      "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-01c6781f-55bb-4d67-af6a-3ad84310f632"
        },
        "package": {
          "href": "/v3/packages/guid-8d947be6-9b5b-4150-b667-3b10286d8fe0"
        },
        "app": {
          "href": "/v3/apps/guid-486e7467-e1c9-4688-bc21-4de194e5d332"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-486e7467-e1c9-4688-bc21-4de194e5d332/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-f5529581-eb76-4af1-a290-260d0a84e271",
      "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-f5529581-eb76-4af1-a290-260d0a84e271"
        },
        "package": {
          "href": "/v3/packages/guid-8d947be6-9b5b-4150-b667-3b10286d8fe0"
        },
        "app": {
          "href": "/v3/apps/guid-486e7467-e1c9-4688-bc21-4de194e5d332"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-486e7467-e1c9-4688-bc21-4de194e5d332/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 144692f6-a4dc-4c7b-a406-62f1659e1de7
Content-Length: 2232
X-Content-Type-Options: nosniff