Filters Droplets by states, app_guids
GET /v3/apps/:guid/droplets
Request
Route
GET /v3/apps/guid-e680f959-273c-4a2d-8278-74407a9bfafb/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
|
|
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-e680f959-273c-4a2d-8278-74407a9bfafb/droplets?states=STAGED%2CFAILED&page=1&per_page=2&order_by=-created_at" -X GET \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0NCIsImVtYWlsIjoiZW1haWwtMzE2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTM4MzcyODZ9.g7V6ztVpdcS-9ZYH2BTbi9NKhF_QxzfzIsHuMm1boiQ" \
-H "Host: example.org" \
-H "Cookie: "
Response
Status
200 OK
Body
{
"pagination": {
"total_results": 2,
"first": {
"href": "/v3/apps/guid-e680f959-273c-4a2d-8278-74407a9bfafb/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
},
"last": {
"href": "/v3/apps/guid-e680f959-273c-4a2d-8278-74407a9bfafb/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
},
"next": null,
"previous": null
},
"resources": [
{
"guid": "guid-dfd62a6a-f877-4abc-b30e-a781e7100071",
"state": "FAILED",
"error": null,
"lifecycle": {
"type": "buildpack",
"data": {
"buildpack": "name-2564",
"stack": "name-2565"
}
},
"memory_limit": null,
"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-01-19T19:41:26Z",
"links": {
"self": {
"href": "/v3/droplets/guid-dfd62a6a-f877-4abc-b30e-a781e7100071"
},
"package": {
"href": "/v3/packages/guid-a1b79b6e-31eb-4b70-8665-fc436accfd22"
},
"app": {
"href": "/v3/apps/guid-e680f959-273c-4a2d-8278-74407a9bfafb"
},
"assign_current_droplet": {
"href": "/v3/apps/guid-e680f959-273c-4a2d-8278-74407a9bfafb/current_droplet",
"method": "PUT"
}
}
},
{
"guid": "guid-3a3b8510-98be-4de2-bb42-b20bb041b881",
"state": "STAGED",
"error": null,
"lifecycle": {
"type": "buildpack",
"data": {
"buildpack": "name-2560",
"stack": "name-2561"
}
},
"memory_limit": null,
"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-01-19T19:41:26Z",
"links": {
"self": {
"href": "/v3/droplets/guid-3a3b8510-98be-4de2-bb42-b20bb041b881"
},
"package": {
"href": "/v3/packages/guid-a1b79b6e-31eb-4b70-8665-fc436accfd22"
},
"app": {
"href": "/v3/apps/guid-e680f959-273c-4a2d-8278-74407a9bfafb"
},
"assign_current_droplet": {
"href": "/v3/apps/guid-e680f959-273c-4a2d-8278-74407a9bfafb/current_droplet",
"method": "PUT"
}
}
}
]
}
Headers