Home
Version 3
Droplets (Experimental) API

Droplets (Experimental) API

Filters Droplets by states

GET /v3/apps/:guid/droplets

Request

Route

GET /v3/apps/guid-d3d8035a-03d2-430e-9e5f-5958a8453e17/droplets?states=STAGED%2CFAILED&page=1&per_page=2&order_by=-created_at

Parameters

Name Description Valid Values Example Values
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
states: STAGED,FAILED
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1OCIsImVtYWlsIjoiZW1haWwtMzI2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2OTN9.XA5JTY9clEW81VGqPGfEwVSHuyTsQ92nTrj9c58rJbU
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-d3d8035a-03d2-430e-9e5f-5958a8453e17/droplets?states=STAGED%2CFAILED&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1OCIsImVtYWlsIjoiZW1haWwtMzI2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2OTN9.XA5JTY9clEW81VGqPGfEwVSHuyTsQ92nTrj9c58rJbU" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/apps/guid-d3d8035a-03d2-430e-9e5f-5958a8453e17/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
    },
    "last": {
      "href": "/v3/apps/guid-d3d8035a-03d2-430e-9e5f-5958a8453e17/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-dd871f5b-4769-4f4b-92e5-7c223884b59e",
      "state": "FAILED",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-2650",
          "stack": "name-2651"
        }
      },
      "memory_limit": 123,
      "disk_limit": null,
      "result": {
        "execution_metadata": null,
        "process_types": null,
        "hash": {
          "type": "sha1",
          "value": "my-hash"
        },
        "buildpack": "https://github.com/cloudfoundry/my-buildpack.git",
        "stack": null
      },
      "environment_variables": {

      },
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": "2016-03-17T21:41:33Z",
      "links": {
        "self": {
          "href": "/v3/droplets/guid-dd871f5b-4769-4f4b-92e5-7c223884b59e"
        },
        "package": {
          "href": "/v3/packages/guid-7ca44db8-62bc-4d57-9262-5aa5f4215432"
        },
        "app": {
          "href": "/v3/apps/guid-d3d8035a-03d2-430e-9e5f-5958a8453e17"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-d3d8035a-03d2-430e-9e5f-5958a8453e17/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-1fecf3af-cfc8-4465-bec6-24be155671ed",
      "state": "STAGED",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-2646",
          "stack": "name-2647"
        }
      },
      "memory_limit": 123,
      "disk_limit": null,
      "result": {
        "execution_metadata": null,
        "process_types": "{\"web\":\"started\"}",
        "hash": {
          "type": "sha1",
          "value": "my-hash"
        },
        "buildpack": "https://github.com/cloudfoundry/my-buildpack.git",
        "stack": null
      },
      "environment_variables": {

      },
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": "2016-03-17T21:41:33Z",
      "links": {
        "self": {
          "href": "/v3/droplets/guid-1fecf3af-cfc8-4465-bec6-24be155671ed"
        },
        "package": {
          "href": "/v3/packages/guid-7ca44db8-62bc-4d57-9262-5aa5f4215432"
        },
        "app": {
          "href": "/v3/apps/guid-d3d8035a-03d2-430e-9e5f-5958a8453e17"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-d3d8035a-03d2-430e-9e5f-5958a8453e17/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

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.019412
Content-Length: 2895