Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

List associated droplets

GET /v3/apps/:guid/droplets

Request

Route

GET /v3/apps/guid-3148bed0-6eb8-4e3e-8768-06ed03f92ec6/droplets?page=1&per_page=2&order_by=created_at&order_direction=asc

Parameters

Name Description Valid Values Example Values
states Droplet state to filter by
  • PENDING
  • STAGING
  • STAGED
  • FAILED
  • states[]=PENDING&states[]=STAGING
page Page to display
  • >= 1
per_page Number of results per page
  • 1-5000
order_by Value to sort by
  • created_at
  • updated_at
order_direction Direction to sort by
  • asc
  • desc
page: 1
per_page: 2
order_by: created_at
order_direction: asc

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQzNiIsImVtYWlsIjoiZW1haWwtMzA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NTF9.wJzSDpk-zQLg6odTVr91LZqMfvG1ltC1TvutGHNsrHs
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-3148bed0-6eb8-4e3e-8768-06ed03f92ec6/droplets?page=1&per_page=2&order_by=created_at&order_direction=asc" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQzNiIsImVtYWlsIjoiZW1haWwtMzA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NTF9.wJzSDpk-zQLg6odTVr91LZqMfvG1ltC1TvutGHNsrHs" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/apps/guid-3148bed0-6eb8-4e3e-8768-06ed03f92ec6/droplets?order_by=created_at&order_direction=asc&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps/guid-3148bed0-6eb8-4e3e-8768-06ed03f92ec6/droplets?order_by=created_at&order_direction=asc&page=1&per_page=2"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-4dce5af8-7acf-4fb2-99dc-b6de8f848fe0",
      "state": "STAGING",
      "hash": {
        "type": "sha1",
        "value": null
      },
      "buildpack": "name-2345",
      "error": null,
      "procfile": null,
      "environment_variables": {
        "yuu": "huuu"
      },
      "created_at": "1970-01-01T00:00:01Z",
      "updated_at": null,
      "_links": {
        "self": {
          "href": "/v3/droplets/guid-4dce5af8-7acf-4fb2-99dc-b6de8f848fe0"
        },
        "package": {
          "href": "/v3/packages/guid-472759a4-6937-43b2-959e-1ed62f02e0bb"
        },
        "app": {
          "href": "/v3/apps/guid-3148bed0-6eb8-4e3e-8768-06ed03f92ec6"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-3148bed0-6eb8-4e3e-8768-06ed03f92ec6/current_droplet",
          "method": "PUT"
        },
        "buildpack": {
          "href": "/v2/buildpacks/d8ab3522-d55f-444e-a38d-a9e10cc1d0cd"
        }
      }
    },
    {
      "guid": "guid-4c91a486-a288-45ee-929b-71e8c0073452",
      "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-4c91a486-a288-45ee-929b-71e8c0073452"
        },
        "package": {
          "href": "/v3/packages/guid-472759a4-6937-43b2-959e-1ed62f02e0bb"
        },
        "app": {
          "href": "/v3/apps/guid-3148bed0-6eb8-4e3e-8768-06ed03f92ec6"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-3148bed0-6eb8-4e3e-8768-06ed03f92ec6/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ec548f37-c1cc-4b17-a93b-1a203d82c870
Content-Length: 2300
X-Content-Type-Options: nosniff