Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

Filters Droplets by states, app_guids

GET /v3/apps/:guid/droplets

Request

Route

GET /v3/apps/guid-01e350db-c744-4a06-a0e1-b5aba661673f/droplets?states=STAGED%2CFAILED&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
states: STAGED,FAILED
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk1IiwiZW1haWwiOiJlbWFpbC02M0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ0NzgyOTI0fQ.g5g_OgF8oFEzzz3cb_auiRrkdwjUTN5w410AVj8C5-k
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-01e350db-c744-4a06-a0e1-b5aba661673f/droplets?states=STAGED%2CFAILED&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk1IiwiZW1haWwiOiJlbWFpbC02M0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ0NzgyOTI0fQ.g5g_OgF8oFEzzz3cb_auiRrkdwjUTN5w410AVj8C5-k" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 2,
    "first": {
      "href": "/v3/apps/guid-01e350db-c744-4a06-a0e1-b5aba661673f/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
    },
    "last": {
      "href": "/v3/apps/guid-01e350db-c744-4a06-a0e1-b5aba661673f/droplets?order_by=-created_at&page=1&per_page=2&states=STAGED%2CFAILED"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-0e3c6a4c-7a9c-4526-a18d-e3c70b222963",
      "state": "FAILED",
      "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-0e3c6a4c-7a9c-4526-a18d-e3c70b222963"
        },
        "package": {
          "href": "/v3/packages/guid-af39f9a8-6812-4dec-9635-3772f5875aff"
        },
        "app": {
          "href": "/v3/apps/guid-01e350db-c744-4a06-a0e1-b5aba661673f"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-01e350db-c744-4a06-a0e1-b5aba661673f/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-42700714-16eb-4b17-b6e8-7226d8119fa4",
      "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-42700714-16eb-4b17-b6e8-7226d8119fa4"
        },
        "package": {
          "href": "/v3/packages/guid-af39f9a8-6812-4dec-9635-3772f5875aff"
        },
        "app": {
          "href": "/v3/apps/guid-01e350db-c744-4a06-a0e1-b5aba661673f"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-01e350db-c744-4a06-a0e1-b5aba661673f/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 9c8047e7-5675-4510-a8b8-8773c83874e7
Content-Length: 2222
X-Content-Type-Options: nosniff