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

Parameters

Name Description Valid Values Example Values
app_guids Apps to filter by
  • app guids
  • app_guids=app_guid1,app_guid2
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.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1NCIsImVtYWlsIjoiZW1haWwtMzIyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDh9.h2m9WMXTlB9Awe8Hwwj3w1bqEbp4zhiqcEDhAmSazj8
Host: example.org
Cookie: 

cURL

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

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-dbc59191-1407-4b4b-81aa-bc2ffa63e05e",
      "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-dbc59191-1407-4b4b-81aa-bc2ffa63e05e"
        },
        "package": {
          "href": "/v3/packages/guid-46ecf573-e05c-4b6c-ad26-f237662fd6fe"
        },
        "app": {
          "href": "/v3/apps/guid-995ee15c-34c8-4a57-af3f-b0a5f10b3557"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-995ee15c-34c8-4a57-af3f-b0a5f10b3557/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-1821f133-f036-489c-8bf2-4da3801ac704",
      "state": "STAGING",
      "hash": {
        "type": "sha1",
        "value": null
      },
      "buildpack": "name-2452",
      "error": null,
      "procfile": null,
      "environment_variables": {
        "yuu": "huuu"
      },
      "created_at": "1970-01-01T00:00:01Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/droplets/guid-1821f133-f036-489c-8bf2-4da3801ac704"
        },
        "package": {
          "href": "/v3/packages/guid-46ecf573-e05c-4b6c-ad26-f237662fd6fe"
        },
        "app": {
          "href": "/v3/apps/guid-995ee15c-34c8-4a57-af3f-b0a5f10b3557"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-995ee15c-34c8-4a57-af3f-b0a5f10b3557/current_droplet",
          "method": "PUT"
        },
        "buildpack": {
          "href": "/v2/buildpacks/a4c8e973-2b1c-41af-ab9c-efdbce671043"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 71d3c7e9-8086-4ac0-8819-fa642614576e
Content-Length: 2166
X-Content-Type-Options: nosniff