Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

Filters Apps by guids, names, spaces, and organizations

GET /v3/apps

Request

Route

GET /v3/apps?names=my_app1&space_guids=6863be1c-b6fc-4adc-b072-de56d6602034%2Cbacf7154-f625-435c-9b77-b5380c712de5%2C008a0b81-ff6f-4703-982b-b6e97f7a1b77&page=1&per_page=2&order_by=-created_at

Parameters

Name Description Valid Values Example Values
names Names of apps to filter by
  • array of strings
  • names=name1,name2
space_guids Spaces to filter by
  • array of strings
  • space_guids=space_guid1,space_guid2
organization_guids Organizations to filter by
  • array of strings
  • organization_guids=org_guid1,org_guid2
guids App guids to filter by
  • array of strings
  • guid=guid1,guid2
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
names: my_app1
space_guids: 6863be1c-b6fc-4adc-b072-de56d6602034,bacf7154-f625-435c-9b77-b5380c712de5,008a0b81-ff6f-4703-982b-b6e97f7a1b77
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwNyIsImVtYWlsIjoiZW1haWwtMTQyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTMzMTA5ODB9.k7B-oY_WkDJuU3pkago_8McEAbKIpOvUioRS8C4kV6s
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names=my_app1&space_guids=6863be1c-b6fc-4adc-b072-de56d6602034%2Cbacf7154-f625-435c-9b77-b5380c712de5%2C008a0b81-ff6f-4703-982b-b6e97f7a1b77&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwNyIsImVtYWlsIjoiZW1haWwtMTQyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTMzMTA5ODB9.k7B-oY_WkDJuU3pkago_8McEAbKIpOvUioRS8C4kV6s" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=1&per_page=2&space_guids=6863be1c-b6fc-4adc-b072-de56d6602034%2Cbacf7154-f625-435c-9b77-b5380c712de5%2C008a0b81-ff6f-4703-982b-b6e97f7a1b77"
    },
    "last": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=6863be1c-b6fc-4adc-b072-de56d6602034%2Cbacf7154-f625-435c-9b77-b5380c712de5%2C008a0b81-ff6f-4703-982b-b6e97f7a1b77"
    },
    "next": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=6863be1c-b6fc-4adc-b072-de56d6602034%2Cbacf7154-f625-435c-9b77-b5380c712de5%2C008a0b81-ff6f-4703-982b-b6e97f7a1b77"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-23b3fa99-c936-42db-ba49-ea6cedd8c5dc",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2016-01-13T17:29:40Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-646",
          "stack": "name-647"
        }
      },
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-23b3fa99-c936-42db-ba49-ea6cedd8c5dc"
        },
        "space": {
          "href": "/v2/spaces/6863be1c-b6fc-4adc-b072-de56d6602034"
        },
        "processes": {
          "href": "/v3/apps/guid-23b3fa99-c936-42db-ba49-ea6cedd8c5dc/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-23b3fa99-c936-42db-ba49-ea6cedd8c5dc/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-23b3fa99-c936-42db-ba49-ea6cedd8c5dc/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-23b3fa99-c936-42db-ba49-ea6cedd8c5dc/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-23b3fa99-c936-42db-ba49-ea6cedd8c5dc/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-23b3fa99-c936-42db-ba49-ea6cedd8c5dc/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-23b3fa99-c936-42db-ba49-ea6cedd8c5dc/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-ab2a5f45-598a-4394-bb4e-5b73b0458a00",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2016-01-13T17:29:40Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-648",
          "stack": "name-649"
        }
      },
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-ab2a5f45-598a-4394-bb4e-5b73b0458a00"
        },
        "space": {
          "href": "/v2/spaces/008a0b81-ff6f-4703-982b-b6e97f7a1b77"
        },
        "processes": {
          "href": "/v3/apps/guid-ab2a5f45-598a-4394-bb4e-5b73b0458a00/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-ab2a5f45-598a-4394-bb4e-5b73b0458a00/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-ab2a5f45-598a-4394-bb4e-5b73b0458a00/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-ab2a5f45-598a-4394-bb4e-5b73b0458a00/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-ab2a5f45-598a-4394-bb4e-5b73b0458a00/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-ab2a5f45-598a-4394-bb4e-5b73b0458a00/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-ab2a5f45-598a-4394-bb4e-5b73b0458a00/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

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.013249
Content-Length: 3832