Home
Version 3
Droplets (Experimental) API

Droplets (Experimental) API

List associated droplets

GET /v3/apps/:guid/droplets

Request

Route

GET /v3/apps/guid-7bf626ea-4e34-438e-946c-e421bad99e67/droplets?page=1&per_page=2&order_by=-created_at

Parameters

Name Description Valid Values Example Values
states Droplet state to filter by
  • PENDING
  • STAGING
  • STAGED
  • FAILED
  • EXPIRED
  • 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.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1NyIsImVtYWlsIjoiZW1haWwtMzI1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2OTN9.RpBI-gwWW8xuNIp2gJTQPVAHyHt6Nidylij-3-kpu_I
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-7bf626ea-4e34-438e-946c-e421bad99e67/droplets?page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1NyIsImVtYWlsIjoiZW1haWwtMzI1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2OTN9.RpBI-gwWW8xuNIp2gJTQPVAHyHt6Nidylij-3-kpu_I" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/apps/guid-7bf626ea-4e34-438e-946c-e421bad99e67/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps/guid-7bf626ea-4e34-438e-946c-e421bad99e67/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-67ebd89f-daa7-4f69-b0c7-58f0d638acda",
      "state": "STAGED",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-2622",
          "stack": "name-2623"
        }
      },
      "memory_limit": 123,
      "disk_limit": null,
      "result": {
        "execution_metadata": null,
        "process_types": "{\"web\":\"started\"}",
        "hash": {
          "type": "sha1",
          "value": "my-hash"
        },
        "buildpack": "https://github.com/cloudfoundry/my-buildpack.git",
        "stack": null
      },
      "environment_variables": {

      },
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": "2016-03-17T21:41:33Z",
      "links": {
        "self": {
          "href": "/v3/droplets/guid-67ebd89f-daa7-4f69-b0c7-58f0d638acda"
        },
        "package": {
          "href": "/v3/packages/guid-1425736e-53a5-45ef-be5f-ee4cb441d3f2"
        },
        "app": {
          "href": "/v3/apps/guid-7bf626ea-4e34-438e-946c-e421bad99e67"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-7bf626ea-4e34-438e-946c-e421bad99e67/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-d954ec11-123b-4a21-b153-e3485719a8f4",
      "state": "STAGING",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-2620",
          "stack": "name-2621"
        }
      },
      "memory_limit": 123,
      "disk_limit": null,
      "result": null,
      "environment_variables": {
        "yuu": "huuu"
      },
      "created_at": "1970-01-01T00:00:01Z",
      "updated_at": "2016-03-17T21:41:33Z",
      "links": {
        "self": {
          "href": "/v3/droplets/guid-d954ec11-123b-4a21-b153-e3485719a8f4"
        },
        "package": {
          "href": "/v3/packages/guid-1425736e-53a5-45ef-be5f-ee4cb441d3f2"
        },
        "app": {
          "href": "/v3/apps/guid-7bf626ea-4e34-438e-946c-e421bad99e67"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-7bf626ea-4e34-438e-946c-e421bad99e67/current_droplet",
          "method": "PUT"
        },
        "buildpack": {
          "href": "/v2/buildpacks/cc3dd619-c6af-4d11-a557-ad0a5d7b9cc1"
        }
      }
    }
  ]
}

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
X-Runtime: 0.019941
Content-Length: 2726