Filters Droplets by states, app_guids
GET /v3/apps/:guid/droplets
Request
Route
GET /v3/apps/guid-e0b13e76-35a4-428b-b26f-447ba5256022/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-e0b13e76-35a4-428b-b26f-447ba5256022/droplets?states=STAGED%2CFAILED&page=1&per_page=2&order_by=-created_at" -X GET \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzNyIsImVtYWlsIjoiZW1haWwtNzNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NTU1NzkzN30.U8CfcecpP3n5JpJS4AwR0QemjpxNsbDttrVCPtgkDTc" \
-H "Host: example.org" \
-H "Cookie: "
Response
Status
200 OK
Body
{
"pagination": {
"total_results": 2,
"first": {
"href": "/v3/apps/guid-e0b13e76-35a4-428b-b26f-447ba5256022/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
},
"last": {
"href": "/v3/apps/guid-e0b13e76-35a4-428b-b26f-447ba5256022/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
},
"next": null,
"previous": null
},
"resources": [
{
"guid": "guid-332d99d2-f737-4d80-a1ca-dfba0cf91d1a",
"state": "FAILED",
"error": null,
"lifecycle": null,
"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-332d99d2-f737-4d80-a1ca-dfba0cf91d1a"
},
"package": {
"href": "/v3/packages/guid-c0c9805d-ff9e-413f-ba8e-a282f601f0a5"
},
"app": {
"href": "/v3/apps/guid-e0b13e76-35a4-428b-b26f-447ba5256022"
},
"assign_current_droplet": {
"href": "/v3/apps/guid-e0b13e76-35a4-428b-b26f-447ba5256022/current_droplet",
"method": "PUT"
}
}
},
{
"guid": "guid-d2603ce3-6c06-4a8f-bf3a-1d1dfe27758c",
"state": "STAGED",
"error": null,
"lifecycle": null,
"memory_limit": null,
"disk_limit": null,
"result": {
"buildpack": "https://github.com/cloudfoundry/my-buildpack.git",
"stack": null,
"process_types": "{\"web\":\"started\"}",
"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-d2603ce3-6c06-4a8f-bf3a-1d1dfe27758c"
},
"package": {
"href": "/v3/packages/guid-c0c9805d-ff9e-413f-ba8e-a282f601f0a5"
},
"app": {
"href": "/v3/apps/guid-e0b13e76-35a4-428b-b26f-447ba5256022"
},
"assign_current_droplet": {
"href": "/v3/apps/guid-e0b13e76-35a4-428b-b26f-447ba5256022/current_droplet",
"method": "PUT"
}
}
}
]
}
Headers