Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

List associated droplets

GET /v3/apps/:guid/droplets

Request

Route

GET /v3/apps/guid-924ad1ab-2062-48c5-9197-b309948efb66/droplets?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
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzNiIsImVtYWlsIjoiZW1haWwtNzJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NTU1NzkzN30.xzeltFdAVMgcE7yFEACrylfZUvmG4ZRoAExJhBkhu7U
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-924ad1ab-2062-48c5-9197-b309948efb66/droplets?page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzNiIsImVtYWlsIjoiZW1haWwtNzJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NTU1NzkzN30.xzeltFdAVMgcE7yFEACrylfZUvmG4ZRoAExJhBkhu7U" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/apps/guid-924ad1ab-2062-48c5-9197-b309948efb66/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps/guid-924ad1ab-2062-48c5-9197-b309948efb66/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-61ce4f0f-02ac-41d2-83c6-0a3d39594e0c",
      "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-61ce4f0f-02ac-41d2-83c6-0a3d39594e0c"
        },
        "package": {
          "href": "/v3/packages/guid-b18e1f8c-a2e1-48c1-8b31-c812e8e1dfba"
        },
        "app": {
          "href": "/v3/apps/guid-924ad1ab-2062-48c5-9197-b309948efb66"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-924ad1ab-2062-48c5-9197-b309948efb66/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-86c0a760-b54d-4980-86bf-27a9ac6a6ef0",
      "state": "STAGING",
      "error": null,
      "lifecycle": null,
      "memory_limit": null,
      "disk_limit": null,
      "result": {
        "buildpack": "name-1267",
        "stack": null,
        "process_types": null,
        "hash": {
          "type": "sha1",
          "value": null
        },
        "execution_metadata": null
      },
      "environment_variables": {
        "yuu": "huuu"
      },
      "created_at": "1970-01-01T00:00:01Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/droplets/guid-86c0a760-b54d-4980-86bf-27a9ac6a6ef0"
        },
        "package": {
          "href": "/v3/packages/guid-b18e1f8c-a2e1-48c1-8b31-c812e8e1dfba"
        },
        "app": {
          "href": "/v3/apps/guid-924ad1ab-2062-48c5-9197-b309948efb66"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-924ad1ab-2062-48c5-9197-b309948efb66/current_droplet",
          "method": "PUT"
        },
        "buildpack": {
          "href": "/v2/buildpacks/9471f6ed-d422-45e2-aaa3-06d8034c3a02"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: de81efd1-e8dc-4255-95e2-4547e78df24b
Content-Length: 2641
X-Content-Type-Options: nosniff