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

Parameters

Name Description Valid Values Example Values
page Page to display
  • >= 1
per_page Number of results per page
  • 1-5000
page: 1
per_page: 2

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1MSIsImVtYWlsIjoiZW1haWwtMjQxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE4MTB9.Z-tPj6dRYE1wivaRJmW2N1sFodrkCs_nONIqhw9zHA4
Host: example.org
Cookie: 

cURL

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

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/droplets?page=1&per_page=2"
    },
    "last": {
      "href": "/v3/droplets?page=1&per_page=2"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-5be1225e-5f49-499a-87db-bcdff646eed6",
      "state": "STAGING",
      "hash": {
        "type": "sha1",
        "value": null
      },
      "buildpack": "name-2141",
      "error": null,
      "procfile": null,
      "environment_variables": {
        "yuu": "huuu"
      },
      "created_at": "2015-07-27T22:43:30Z",
      "updated_at": null,
      "_links": {
        "self": {
          "href": "/v3/droplets/guid-5be1225e-5f49-499a-87db-bcdff646eed6"
        },
        "package": {
          "href": "/v3/packages/guid-09037508-293d-4923-9552-12fe9cda5f98"
        },
        "app": {
          "href": "/v3/apps/guid-d686e53a-9a5b-4bad-b1f5-0fe264b2b0c0"
        },
        "buildpack": {
          "href": "/v2/buildpacks/b0179650-8a4f-4b3a-b485-255118b0c619"
        }
      }
    },
    {
      "guid": "guid-74a54cf4-99a5-40b1-8f81-74377c36240d",
      "state": "STAGED",
      "hash": {
        "type": "sha1",
        "value": "my-hash"
      },
      "buildpack": "https://github.com/cloudfoundry/my-buildpack.git",
      "error": null,
      "procfile": null,
      "environment_variables": {

      },
      "created_at": "2015-07-27T22:43:30Z",
      "updated_at": null,
      "_links": {
        "self": {
          "href": "/v3/droplets/guid-74a54cf4-99a5-40b1-8f81-74377c36240d"
        },
        "package": {
          "href": "/v3/packages/guid-09037508-293d-4923-9552-12fe9cda5f98"
        },
        "app": {
          "href": "/v3/apps/guid-d686e53a-9a5b-4bad-b1f5-0fe264b2b0c0"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-d686e53a-9a5b-4bad-b1f5-0fe264b2b0c0/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d044978f-fe1d-4ab8-93ec-26577823ef5e
Content-Length: 1965
X-Content-Type-Options: nosniff