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.eyJ1c2VyX2lkIjoidWFhLWlkLTQxNSIsImVtYWlsIjoiZW1haWwtMzA1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MTl9.0ZME5nrhkqbAi7BPtoH8kXbSTn3oCECo0mq3t2aFF8I
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.eyJ1c2VyX2lkIjoidWFhLWlkLTQxNSIsImVtYWlsIjoiZW1haWwtMzA1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MTl9.0ZME5nrhkqbAi7BPtoH8kXbSTn3oCECo0mq3t2aFF8I" \
	-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-331a53ae-06ef-4940-8274-6f495140cf6f",
      "state": "STAGING",
      "hash": {
        "type": "sha1",
        "value": null
      },
      "buildpack": "name-2429",
      "error": null,
      "procfile": null,
      "environment_variables": {
        "yuu": "huuu"
      },
      "created_at": "1970-01-01T00:00:01Z",
      "updated_at": null,
      "_links": {
        "self": {
          "href": "/v3/droplets/guid-331a53ae-06ef-4940-8274-6f495140cf6f"
        },
        "package": {
          "href": "/v3/packages/guid-e066e956-230a-46e2-84ba-39feccbcee8c"
        },
        "app": {
          "href": "/v3/apps/guid-29650e0c-d76a-4c70-9708-b9e01d595c48"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-29650e0c-d76a-4c70-9708-b9e01d595c48/current_droplet",
          "method": "PUT"
        },
        "buildpack": {
          "href": "/v2/buildpacks/a92010c5-65dc-44fb-9397-629585e09948"
        }
      }
    },
    {
      "guid": "guid-f7376190-7dea-416d-b3f5-e4b1ac1e178a",
      "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-f7376190-7dea-416d-b3f5-e4b1ac1e178a"
        },
        "package": {
          "href": "/v3/packages/guid-e066e956-230a-46e2-84ba-39feccbcee8c"
        },
        "app": {
          "href": "/v3/apps/guid-29650e0c-d76a-4c70-9708-b9e01d595c48"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-29650e0c-d76a-4c70-9708-b9e01d595c48/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 42105c2b-f598-47ce-81d8-883e06f2a3ab
Content-Length: 2206
X-Content-Type-Options: nosniff