Home
Version 3
Droplets (Experimental) API

Droplets (Experimental) API

List all Droplets

GET /v3/droplets

Request

Route

GET /v3/droplets?page=1&per_page=2&order_by=created_at&order_direction=asc

Parameters

Name Description Valid Values Example Values
app_guids Apps to filter by
  • app guids
  • app_guids[]=app_guid1&app_guids[]=app_guid2
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.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MyIsImVtYWlsIjoiZW1haWwtMTI2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1MzV9.xbpwaqmF_kEauMaROBOvmoxIbgnasNIBV9qOXtvnGd8
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/droplets?page=1&per_page=2&order_by=created_at&order_direction=asc" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MyIsImVtYWlsIjoiZW1haWwtMTI2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1MzV9.xbpwaqmF_kEauMaROBOvmoxIbgnasNIBV9qOXtvnGd8" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/droplets?order_by=created_at&order_direction=asc&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/droplets?order_by=created_at&order_direction=asc&page=1&per_page=2"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-2606e440-c583-48ae-a5b7-cef4603427e5",
      "state": "STAGING",
      "hash": {
        "type": "sha1",
        "value": null
      },
      "buildpack": "name-620",
      "error": null,
      "procfile": null,
      "environment_variables": {
        "yuu": "huuu"
      },
      "created_at": "1970-01-01T00:00:01Z",
      "updated_at": null,
      "_links": {
        "self": {
          "href": "/v3/droplets/guid-2606e440-c583-48ae-a5b7-cef4603427e5"
        },
        "package": {
          "href": "/v3/packages/guid-7ad6cb78-f5f2-4e3d-8266-1420041637a6"
        },
        "app": {
          "href": "/v3/apps/guid-7f5932ec-02a8-4537-aee1-a6ddb9531aef"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-7f5932ec-02a8-4537-aee1-a6ddb9531aef/current_droplet",
          "method": "PUT"
        },
        "buildpack": {
          "href": "/v2/buildpacks/d624e993-3872-4995-a274-18b480a9253c"
        }
      }
    },
    {
      "guid": "guid-e5051e80-3386-444f-b81d-a5e86d2b9aa1",
      "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-e5051e80-3386-444f-b81d-a5e86d2b9aa1"
        },
        "package": {
          "href": "/v3/packages/guid-7ad6cb78-f5f2-4e3d-8266-1420041637a6"
        },
        "app": {
          "href": "/v3/apps/guid-7f5932ec-02a8-4537-aee1-a6ddb9531aef"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-7f5932ec-02a8-4537-aee1-a6ddb9531aef/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6c28cd2f-d279-461b-9ac9-5302c01c4db0
Content-Length: 2205
X-Content-Type-Options: nosniff