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-4378ff33-cd21-4479-a906-1d516662bf42&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-4378ff33-cd21-4479-a906-1d516662bf42
states: STAGED,FAILED
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxNSIsImVtYWlsIjoiZW1haWwtMTc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDJ9.o1Z5NnZ11JvTb4-PS-4KsV_m5xpGJo9m9mVY9nvgzdI
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/droplets?app_guids=guid-4378ff33-cd21-4479-a906-1d516662bf42&states=STAGED%2CFAILED&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxNSIsImVtYWlsIjoiZW1haWwtMTc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDJ9.o1Z5NnZ11JvTb4-PS-4KsV_m5xpGJo9m9mVY9nvgzdI" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/droplets?app_guids=guid-4378ff33-cd21-4479-a906-1d516662bf42&order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
    },
    "last": {
      "href": "/v3/droplets?app_guids=guid-4378ff33-cd21-4479-a906-1d516662bf42&order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-0557ef60-089b-43f9-b46f-5bb2df7c821b",
      "state": "FAILED",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-1028",
          "stack": "name-1029"
        }
      },
      "memory_limit": null,
      "disk_limit": null,
      "result": {
        "buildpack": "https://github.com/cloudfoundry/my-buildpack.git",
        "stack": null,
        "process_types": null,
        "hash": {
          "type": "sha1",
          "value": "my-hash"
        },
        "execution_metadata": null
      },
      "environment_variables": {

      },
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/droplets/guid-0557ef60-089b-43f9-b46f-5bb2df7c821b"
        },
        "package": {
          "href": "/v3/packages/guid-c91ac416-dfe2-4e0a-a140-8691096ef0ff"
        },
        "app": {
          "href": "/v3/apps/guid-4378ff33-cd21-4479-a906-1d516662bf42"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-4378ff33-cd21-4479-a906-1d516662bf42/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-8155bf79-e794-415f-966d-393f762e7560",
      "state": "STAGED",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-1024",
          "stack": "name-1025"
        }
      },
      "memory_limit": 123,
      "disk_limit": 456,
      "result": {
        "buildpack": "https://github.com/cloudfoundry/detected-buildpack.git",
        "stack": null,
        "process_types": {
          "web": "started"
        },
        "hash": {
          "type": "sha1",
          "value": "my-hash"
        },
        "execution_metadata": "black-box-secrets"
      },
      "environment_variables": {

      },
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/droplets/guid-8155bf79-e794-415f-966d-393f762e7560"
        },
        "package": {
          "href": "/v3/packages/guid-c91ac416-dfe2-4e0a-a140-8691096ef0ff"
        },
        "app": {
          "href": "/v3/apps/guid-4378ff33-cd21-4479-a906-1d516662bf42"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-4378ff33-cd21-4479-a906-1d516662bf42/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b6d87c20-f8a0-488b-8adc-2d50341444b5
Content-Length: 2905
X-Content-Type-Options: nosniff