Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

List associated droplets

GET /v3/apps/:guid/droplets

Request

Route

GET /v3/apps/guid-27c76317-065d-434f-9e2c-8273831cad20/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.eyJ1c2VyX2lkIjoidWFhLWlkLTIiLCJlbWFpbCI6ImVtYWlsLTJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NDI2MDYzMn0.UWCbk9Zj7ENQkc6zHW2N0rLJrAWBX61JcZTLjDaVD9k
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-27c76317-065d-434f-9e2c-8273831cad20/droplets?page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIiLCJlbWFpbCI6ImVtYWlsLTJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NDI2MDYzMn0.UWCbk9Zj7ENQkc6zHW2N0rLJrAWBX61JcZTLjDaVD9k" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/apps/guid-27c76317-065d-434f-9e2c-8273831cad20/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps/guid-27c76317-065d-434f-9e2c-8273831cad20/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-c0f39294-3167-481b-aa87-36f56e901d3a",
      "state": "STAGED",
      "hash": {
        "type": "sha1",
        "value": "my-hash"
      },
      "buildpack": "https://github.com/cloudfoundry/my-buildpack.git",
      "error": null,
      "procfile": null,
      "environment_variables": {

      },
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/droplets/guid-c0f39294-3167-481b-aa87-36f56e901d3a"
        },
        "package": {
          "href": "/v3/packages/guid-b39e6ef5-2446-41e7-b171-6b05b761544a"
        },
        "app": {
          "href": "/v3/apps/guid-27c76317-065d-434f-9e2c-8273831cad20"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-27c76317-065d-434f-9e2c-8273831cad20/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-52449a05-2ec5-49c9-9808-faea44819e36",
      "state": "STAGING",
      "hash": {
        "type": "sha1",
        "value": null
      },
      "buildpack": "name-13",
      "error": null,
      "procfile": null,
      "environment_variables": {
        "yuu": "huuu"
      },
      "created_at": "1970-01-01T00:00:01Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/droplets/guid-52449a05-2ec5-49c9-9808-faea44819e36"
        },
        "package": {
          "href": "/v3/packages/guid-b39e6ef5-2446-41e7-b171-6b05b761544a"
        },
        "app": {
          "href": "/v3/apps/guid-27c76317-065d-434f-9e2c-8273831cad20"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-27c76317-065d-434f-9e2c-8273831cad20/current_droplet",
          "method": "PUT"
        },
        "buildpack": {
          "href": "/v2/buildpacks/a60b0a2e-517b-4df7-a8dc-51e0d95c5aee"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 876822ae-a167-43b6-8f05-cc2be8bfe0f8
Content-Length: 2258
X-Content-Type-Options: nosniff