Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

List associated droplets

GET /v3/apps/:guid/droplets

Request

Route

GET /v3/apps/guid-70fac8c6-3f93-4e21-acad-a0f35024bd44/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
  • 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.eyJ1c2VyX2lkIjoidWFhLWlkLTM5MiIsImVtYWlsIjoiZW1haWwtMjYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5Njh9.kBXQezf-V_fKIjcreHxkUT_hsmdz2Bm4W7wjyvloLnE
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-70fac8c6-3f93-4e21-acad-a0f35024bd44/droplets?page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5MiIsImVtYWlsIjoiZW1haWwtMjYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5Njh9.kBXQezf-V_fKIjcreHxkUT_hsmdz2Bm4W7wjyvloLnE" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/apps/guid-70fac8c6-3f93-4e21-acad-a0f35024bd44/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps/guid-70fac8c6-3f93-4e21-acad-a0f35024bd44/droplets?order_by=-created_at&page=1&per_page=2"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-09dd2bfd-bf71-4e35-9463-3bbc891df176",
      "state": "STAGED",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-2042",
          "stack": "name-2043"
        }
      },
      "memory_limit": null,
      "disk_limit": null,
      "result": {
        "buildpack": "https://github.com/cloudfoundry/my-buildpack.git",
        "stack": null,
        "process_types": "{\"web\":\"started\"}",
        "hash": {
          "type": "sha1",
          "value": "my-hash"
        },
        "execution_metadata": null
      },
      "environment_variables": {

      },
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": "2015-11-13T17:02:48Z",
      "links": {
        "self": {
          "href": "/v3/droplets/guid-09dd2bfd-bf71-4e35-9463-3bbc891df176"
        },
        "package": {
          "href": "/v3/packages/guid-78245bcd-9e78-4818-acea-4bcb03998e90"
        },
        "app": {
          "href": "/v3/apps/guid-70fac8c6-3f93-4e21-acad-a0f35024bd44"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-70fac8c6-3f93-4e21-acad-a0f35024bd44/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-fdb63257-54ed-4c4e-8eeb-2ff38779dbf3",
      "state": "STAGING",
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-2040",
          "stack": "name-2041"
        }
      },
      "memory_limit": null,
      "disk_limit": null,
      "result": {
        "buildpack": "name-2024",
        "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": "2015-11-13T17:02:48Z",
      "links": {
        "self": {
          "href": "/v3/droplets/guid-fdb63257-54ed-4c4e-8eeb-2ff38779dbf3"
        },
        "package": {
          "href": "/v3/packages/guid-78245bcd-9e78-4818-acea-4bcb03998e90"
        },
        "app": {
          "href": "/v3/apps/guid-70fac8c6-3f93-4e21-acad-a0f35024bd44"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-70fac8c6-3f93-4e21-acad-a0f35024bd44/current_droplet",
          "method": "PUT"
        },
        "buildpack": {
          "href": "/v2/buildpacks/c482ff2f-68d3-49e5-9bdd-0e57f9a72656"
        }
      }
    }
  ]
}

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.021220
Content-Length: 2935