Filters Droplets by states, app_guids
GET /v3/apps/:guid/droplets
Request
Route
GET /v3/apps/guid-ef88f35a-600a-4ebe-904c-7403938d27d9/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-ef88f35a-600a-4ebe-904c-7403938d27d9/droplets?states=STAGED%2CFAILED&page=1&per_page=2&order_by=-created_at" -X GET \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwMCIsImVtYWlsIjoiZW1haWwtMTMxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1MjN9.0y7wZ3HptMlNkFbcu_RbC4PlTrObwSbj9jtHRNPihtQ" \
-H "Host: example.org" \
-H "Cookie: "
Response
Status
200 OK
Body
{
"pagination": {
"total_results": 2,
"first": {
"href": "/v3/apps/guid-ef88f35a-600a-4ebe-904c-7403938d27d9/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
},
"last": {
"href": "/v3/apps/guid-ef88f35a-600a-4ebe-904c-7403938d27d9/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
},
"next": null,
"previous": null
},
"resources": [
{
"guid": "guid-4aebe703-1784-459f-a506-a0e7e0d2f1fc",
"state": "FAILED",
"error": null,
"lifecycle": {
"type": "buildpack",
"data": {
"buildpack": "name-1733",
"stack": "name-1734"
}
},
"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": "2015-11-30T23:38:43Z",
"links": {
"self": {
"href": "/v3/droplets/guid-4aebe703-1784-459f-a506-a0e7e0d2f1fc"
},
"package": {
"href": "/v3/packages/guid-ae420162-eb13-4461-8660-95f692fb82c1"
},
"app": {
"href": "/v3/apps/guid-ef88f35a-600a-4ebe-904c-7403938d27d9"
},
"assign_current_droplet": {
"href": "/v3/apps/guid-ef88f35a-600a-4ebe-904c-7403938d27d9/current_droplet",
"method": "PUT"
}
}
},
{
"guid": "guid-725dd323-fb57-4600-b614-cf13ab7dc935",
"state": "STAGED",
"error": null,
"lifecycle": {
"type": "buildpack",
"data": {
"buildpack": "name-1729",
"stack": "name-1730"
}
},
"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": "2015-11-30T23:38:43Z",
"links": {
"self": {
"href": "/v3/droplets/guid-725dd323-fb57-4600-b614-cf13ab7dc935"
},
"package": {
"href": "/v3/packages/guid-ae420162-eb13-4461-8660-95f692fb82c1"
},
"app": {
"href": "/v3/apps/guid-ef88f35a-600a-4ebe-904c-7403938d27d9"
},
"assign_current_droplet": {
"href": "/v3/apps/guid-ef88f35a-600a-4ebe-904c-7403938d27d9/current_droplet",
"method": "PUT"
}
}
}
]
}
Headers