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.eyJ1c2VyX2lkIjoidWFhLWlkLTIzOSIsImVtYWlsIjoiZW1haWwtMTcxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMTF9.K5-fZyeAM3r1yp90xCLyhmx4J5AIHbep3JgKckYunuM
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.eyJ1c2VyX2lkIjoidWFhLWlkLTIzOSIsImVtYWlsIjoiZW1haWwtMTcxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMTF9.K5-fZyeAM3r1yp90xCLyhmx4J5AIHbep3JgKckYunuM" \
	-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-1f10c7d8-d7e6-48dd-a3ca-0e1ad3a02f44",
      "state": "STAGED",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "https://github.com/cloudfoundry/requested-buildpack.git",
          "stack": null
        }
      },
      "memory_limit": 123,
      "disk_limit": 456,
      "result": {
        "buildpack": "https://github.com/cloudfoundry/detected-buildpack.git",
        "stack": null,
        "process_types": {
          "web": "started"
        },
        "hash": {
          "type": "sha1",
          "value": "my-hash"
        },
        "execution_metadata": "black-box-secrets"
      },
      "environment_variables": {

      },
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/droplets/guid-1f10c7d8-d7e6-48dd-a3ca-0e1ad3a02f44"
        },
        "package": {
          "href": "/v3/packages/guid-c355d37c-7617-4750-a3cc-deefd86fa57d"
        },
        "app": {
          "href": "/v3/apps/guid-20c21088-3425-4729-acb5-9eecf3dc90ed"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-20c21088-3425-4729-acb5-9eecf3dc90ed/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-f4d00758-f5ea-44ed-bfa0-5717c25b85b3",
      "state": "STAGING",
      "error": null,
      "lifecycle": null,
      "memory_limit": null,
      "disk_limit": null,
      "result": {
        "buildpack": "name-928",
        "stack": null,
        "process_types": null,
        "hash": {
          "type": "sha1",
          "value": null
        },
        "execution_metadata": null
      },
      "environment_variables": {
        "yuu": "huuu"
      },
      "created_at": "1970-01-01T00:00:01Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/droplets/guid-f4d00758-f5ea-44ed-bfa0-5717c25b85b3"
        },
        "package": {
          "href": "/v3/packages/guid-c355d37c-7617-4750-a3cc-deefd86fa57d"
        },
        "app": {
          "href": "/v3/apps/guid-20c21088-3425-4729-acb5-9eecf3dc90ed"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-20c21088-3425-4729-acb5-9eecf3dc90ed/current_droplet",
          "method": "PUT"
        },
        "buildpack": {
          "href": "/v2/buildpacks/711cfb14-a0cf-404f-b5e1-2b29db17266a"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 7dddd6f6-df04-4c6e-b65f-4627265d9f69
Content-Length: 2748
X-Content-Type-Options: nosniff