Filters Droplets by states, app_guids
GET /v3/apps/:guid/droplets
Request
Route
GET /v3/apps/guid-c6fc359a-ff73-4da0-97c1-1242b0b2c325/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-c6fc359a-ff73-4da0-97c1-1242b0b2c325/droplets?states=STAGED%2CFAILED&page=1&per_page=2&order_by=-created_at" -X GET \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5OSIsImVtYWlsIjoiZW1haWwtMzAxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMjF9.bA2PMnitDvv2YDAYSEOZhQ5JBR0eNIal1jn9EdaC6rE" \
-H "Host: example.org" \
-H "Cookie: "
Response
Status
200 OK
Body
{
"pagination": {
"total_results": 2,
"first": {
"href": "/v3/apps/guid-c6fc359a-ff73-4da0-97c1-1242b0b2c325/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
},
"last": {
"href": "/v3/apps/guid-c6fc359a-ff73-4da0-97c1-1242b0b2c325/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
},
"next": null,
"previous": null
},
"resources": [
{
"guid": "guid-bc985238-1787-4a27-b7cd-2756afc61bec",
"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-bc985238-1787-4a27-b7cd-2756afc61bec"
},
"package": {
"href": "/v3/packages/guid-4479d66d-8d90-4135-ba62-84477427ea75"
},
"app": {
"href": "/v3/apps/guid-c6fc359a-ff73-4da0-97c1-1242b0b2c325"
},
"assign_current_droplet": {
"href": "/v3/apps/guid-c6fc359a-ff73-4da0-97c1-1242b0b2c325/current_droplet",
"method": "PUT"
}
}
},
{
"guid": "guid-aeaeaff5-14f2-4786-a23e-822a73c48572",
"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-aeaeaff5-14f2-4786-a23e-822a73c48572"
},
"package": {
"href": "/v3/packages/guid-4479d66d-8d90-4135-ba62-84477427ea75"
},
"app": {
"href": "/v3/apps/guid-c6fc359a-ff73-4da0-97c1-1242b0b2c325"
},
"assign_current_droplet": {
"href": "/v3/apps/guid-c6fc359a-ff73-4da0-97c1-1242b0b2c325/current_droplet",
"method": "PUT"
}
}
}
]
}
Headers