Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

Filters Droplets by states, app_guids

GET /v3/apps/:guid/droplets

Request

Route

GET /v3/apps/guid-83c86c20-61ca-46c6-9915-fac1467936ad/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
  • states=PENDING,STAGING
page Page to display
  • >= 1
per_page Number of results per page
  • 1-5000
order_by Value to sort by. Prepend with "+" or "-" to change sort direction to ascending or descending, respectively.
  • created_at
  • updated_at
states: STAGED,FAILED
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MyIsImVtYWlsIjoiZW1haWwtMTU2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDB9.ghjNykJ4ZlyG_Sr05VH3QqCfUxGsqD94GSSCKjTuHxs
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-83c86c20-61ca-46c6-9915-fac1467936ad/droplets?states=STAGED%2CFAILED&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MyIsImVtYWlsIjoiZW1haWwtMTU2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDB9.ghjNykJ4ZlyG_Sr05VH3QqCfUxGsqD94GSSCKjTuHxs" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/apps/guid-83c86c20-61ca-46c6-9915-fac1467936ad/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
    },
    "last": {
      "href": "/v3/apps/guid-83c86c20-61ca-46c6-9915-fac1467936ad/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-26b76197-d895-4ca6-85ec-05f48dc95b01",
      "state": "FAILED",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-928",
          "stack": "name-929"
        }
      },
      "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-26b76197-d895-4ca6-85ec-05f48dc95b01"
        },
        "package": {
          "href": "/v3/packages/guid-495d17d1-beec-409b-8bb7-c6caf21fa1ea"
        },
        "app": {
          "href": "/v3/apps/guid-83c86c20-61ca-46c6-9915-fac1467936ad"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-83c86c20-61ca-46c6-9915-fac1467936ad/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-b68b48e8-efbd-456c-85f9-3a31f8a245b0",
      "state": "STAGED",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-926",
          "stack": "name-927"
        }
      },
      "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-b68b48e8-efbd-456c-85f9-3a31f8a245b0"
        },
        "package": {
          "href": "/v3/packages/guid-495d17d1-beec-409b-8bb7-c6caf21fa1ea"
        },
        "app": {
          "href": "/v3/apps/guid-83c86c20-61ca-46c6-9915-fac1467936ad"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-83c86c20-61ca-46c6-9915-fac1467936ad/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 133056f8-9efe-42ce-8b0b-ae56d74eb383
Content-Length: 2857
X-Content-Type-Options: nosniff