Filters Droplets by states, app_guids
GET /v3/apps/:guid/droplets
Request
Route
GET /v3/apps/guid-99a22ff4-d92a-4b88-8dd4-f975346a3727/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
|
|
page
|
Page to display
|
|
|
per_page
|
Number of results per page
|
|
|
order_by
|
Value to sort by. Prepend with "+" or "-" to change sort direction to ascending or descending, respectively.
|
|
|
states: STAGED,FAILED
page: 1
per_page: 2
order_by: -created_at
Headers
cURL
curl "https://api.[your-domain.com]/v3/apps/guid-99a22ff4-d92a-4b88-8dd4-f975346a3727/droplets?states=STAGED%2CFAILED&page=1&per_page=2&order_by=-created_at" -X GET \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMiLCJlbWFpbCI6ImVtYWlsLTNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NDI2MDYzMn0.0bixX5dfMvhgUvoOLn12Q0hdWq5ffeIFYeOD0eJqCLc" \
-H "Host: example.org" \
-H "Cookie: "
Response
Status
200 OK
Body
{
"pagination": {
"total_results": 2,
"first": {
"href": "/v3/apps/guid-99a22ff4-d92a-4b88-8dd4-f975346a3727/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
},
"last": {
"href": "/v3/apps/guid-99a22ff4-d92a-4b88-8dd4-f975346a3727/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
},
"next": null,
"previous": null
},
"resources": [
{
"guid": "guid-37909977-097f-4fee-9965-095f5f83c967",
"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-37909977-097f-4fee-9965-095f5f83c967"
},
"package": {
"href": "/v3/packages/guid-54209efa-92c7-4c78-a8c9-64f5851ada15"
},
"app": {
"href": "/v3/apps/guid-99a22ff4-d92a-4b88-8dd4-f975346a3727"
},
"assign_current_droplet": {
"href": "/v3/apps/guid-99a22ff4-d92a-4b88-8dd4-f975346a3727/current_droplet",
"method": "PUT"
}
}
},
{
"guid": "guid-596a787d-b888-4bd5-96c9-22fa69cca3cf",
"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-596a787d-b888-4bd5-96c9-22fa69cca3cf"
},
"package": {
"href": "/v3/packages/guid-54209efa-92c7-4c78-a8c9-64f5851ada15"
},
"app": {
"href": "/v3/apps/guid-99a22ff4-d92a-4b88-8dd4-f975346a3727"
},
"assign_current_droplet": {
"href": "/v3/apps/guid-99a22ff4-d92a-4b88-8dd4-f975346a3727/current_droplet",
"method": "PUT"
}
}
}
]
}
Headers