Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

List associated droplets

GET /v3/apps/:guid/droplets

Request

Route

GET /v3/apps/guid-89652a09-8360-44c2-bfa7-6128ac425d27/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.eyJ1c2VyX2lkIjoidWFhLWlkLTE5OSIsImVtYWlsIjoiZW1haWwtMTMwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1MjN9.ZBjl5cGdasZfZi41rPbmJN7pxB41XDcSax6YLCW2MXc
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-89652a09-8360-44c2-bfa7-6128ac425d27/droplets?page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5OSIsImVtYWlsIjoiZW1haWwtMTMwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1MjN9.ZBjl5cGdasZfZi41rPbmJN7pxB41XDcSax6YLCW2MXc" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/apps/guid-89652a09-8360-44c2-bfa7-6128ac425d27/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps/guid-89652a09-8360-44c2-bfa7-6128ac425d27/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-f353576e-3759-42ec-9186-0e540c29942e",
      "state": "STAGED",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-1705",
          "stack": "name-1706"
        }
      },
      "memory_limit": null,
      "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": "2015-11-30T23:38:42Z",
      "links": {
        "self": {
          "href": "/v3/droplets/guid-f353576e-3759-42ec-9186-0e540c29942e"
        },
        "package": {
          "href": "/v3/packages/guid-3bac0326-8cce-498f-ac25-216c976f6c28"
        },
        "app": {
          "href": "/v3/apps/guid-89652a09-8360-44c2-bfa7-6128ac425d27"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-89652a09-8360-44c2-bfa7-6128ac425d27/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-21894259-e418-405f-87f5-eabf778b5897",
      "state": "STAGING",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-1703",
          "stack": "name-1704"
        }
      },
      "memory_limit": null,
      "disk_limit": null,
      "result": null,
      "environment_variables": {
        "yuu": "huuu"
      },
      "created_at": "1970-01-01T00:00:01Z",
      "updated_at": "2015-11-30T23:38:42Z",
      "links": {
        "self": {
          "href": "/v3/droplets/guid-21894259-e418-405f-87f5-eabf778b5897"
        },
        "package": {
          "href": "/v3/packages/guid-3bac0326-8cce-498f-ac25-216c976f6c28"
        },
        "app": {
          "href": "/v3/apps/guid-89652a09-8360-44c2-bfa7-6128ac425d27"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-89652a09-8360-44c2-bfa7-6128ac425d27/current_droplet",
          "method": "PUT"
        },
        "buildpack": {
          "href": "/v2/buildpacks/88b12a75-9605-4845-838e-48e504eaec08"
        }
      }
    }
  ]
}

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.025868
Content-Length: 2728