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-59ce96fe-7fd4-4fa3-9bfd-592caa5473a0/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
  • 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.eyJ1c2VyX2lkIjoidWFhLWlkLTk1IiwiZW1haWwiOiJlbWFpbC02MkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUzMzEwOTc0fQ.KWbZnseMW34FptgLT5bhLRDHGsXpHHxF0-0h6v43hJA
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-59ce96fe-7fd4-4fa3-9bfd-592caa5473a0/droplets?states=STAGED%2CFAILED&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk1IiwiZW1haWwiOiJlbWFpbC02MkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUzMzEwOTc0fQ.KWbZnseMW34FptgLT5bhLRDHGsXpHHxF0-0h6v43hJA" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/apps/guid-59ce96fe-7fd4-4fa3-9bfd-592caa5473a0/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
    },
    "last": {
      "href": "/v3/apps/guid-59ce96fe-7fd4-4fa3-9bfd-592caa5473a0/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-427112cb-e4cc-416a-9d69-135613e535c1",
      "state": "FAILED",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-260",
          "stack": "name-261"
        }
      },
      "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-13T17:29:34Z",
      "links": {
        "self": {
          "href": "/v3/droplets/guid-427112cb-e4cc-416a-9d69-135613e535c1"
        },
        "package": {
          "href": "/v3/packages/guid-508aa4bc-f753-481f-81a5-ff74d59e5162"
        },
        "app": {
          "href": "/v3/apps/guid-59ce96fe-7fd4-4fa3-9bfd-592caa5473a0"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-59ce96fe-7fd4-4fa3-9bfd-592caa5473a0/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-18415f39-e9f9-457b-9441-cbe2f3f12f93",
      "state": "STAGED",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-256",
          "stack": "name-257"
        }
      },
      "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-13T17:29:34Z",
      "links": {
        "self": {
          "href": "/v3/droplets/guid-18415f39-e9f9-457b-9441-cbe2f3f12f93"
        },
        "package": {
          "href": "/v3/packages/guid-508aa4bc-f753-481f-81a5-ff74d59e5162"
        },
        "app": {
          "href": "/v3/apps/guid-59ce96fe-7fd4-4fa3-9bfd-592caa5473a0"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-59ce96fe-7fd4-4fa3-9bfd-592caa5473a0/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
X-Runtime: 0.017770
Content-Length: 2893