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=12170b82-1d74-40ff-b158-64f875811534%2C2fed0607-f92a-4b44-acb8-de6e6a34f688%2C2b9cfb89-f4fc-4b5c-8709-524af54a1ad7&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: 12170b82-1d74-40ff-b158-64f875811534,2fed0607-f92a-4b44-acb8-de6e6a34f688,2b9cfb89-f4fc-4b5c-8709-524af54a1ad7
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyOSIsImVtYWlsIjoiZW1haWwtMTg5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NDN9.zRMqb5dkwzDogx34kd5uDByO09xBHbeClOQZDcYlQsg
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names=my_app1&space_guids=12170b82-1d74-40ff-b158-64f875811534%2C2fed0607-f92a-4b44-acb8-de6e6a34f688%2C2b9cfb89-f4fc-4b5c-8709-524af54a1ad7&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyOSIsImVtYWlsIjoiZW1haWwtMTg5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NDN9.zRMqb5dkwzDogx34kd5uDByO09xBHbeClOQZDcYlQsg" \
	-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=12170b82-1d74-40ff-b158-64f875811534%2C2fed0607-f92a-4b44-acb8-de6e6a34f688%2C2b9cfb89-f4fc-4b5c-8709-524af54a1ad7"
    },
    "last": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=12170b82-1d74-40ff-b158-64f875811534%2C2fed0607-f92a-4b44-acb8-de6e6a34f688%2C2b9cfb89-f4fc-4b5c-8709-524af54a1ad7"
    },
    "next": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=12170b82-1d74-40ff-b158-64f875811534%2C2fed0607-f92a-4b44-acb8-de6e6a34f688%2C2b9cfb89-f4fc-4b5c-8709-524af54a1ad7"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-57a3aebd-0941-4da1-b098-e831ad27e479",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2016-03-14T22:30:43Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-2056",
          "stack": "name-2057"
        }
      },
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-57a3aebd-0941-4da1-b098-e831ad27e479"
        },
        "space": {
          "href": "/v2/spaces/12170b82-1d74-40ff-b158-64f875811534"
        },
        "processes": {
          "href": "/v3/apps/guid-57a3aebd-0941-4da1-b098-e831ad27e479/processes"
        },
        "route_mappings": {
          "href": "/v3/apps/guid-57a3aebd-0941-4da1-b098-e831ad27e479/route_mappings"
        },
        "packages": {
          "href": "/v3/apps/guid-57a3aebd-0941-4da1-b098-e831ad27e479/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-57a3aebd-0941-4da1-b098-e831ad27e479/droplets"
        },
        "tasks": {
          "href": "/v3/apps/guid-57a3aebd-0941-4da1-b098-e831ad27e479/tasks"
        },
        "start": {
          "href": "/v3/apps/guid-57a3aebd-0941-4da1-b098-e831ad27e479/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-57a3aebd-0941-4da1-b098-e831ad27e479/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-57a3aebd-0941-4da1-b098-e831ad27e479/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-9c492bfa-146c-46b5-8d31-2368b11221d5",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2016-03-14T22:30:43Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-2058",
          "stack": "name-2059"
        }
      },
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-9c492bfa-146c-46b5-8d31-2368b11221d5"
        },
        "space": {
          "href": "/v2/spaces/2b9cfb89-f4fc-4b5c-8709-524af54a1ad7"
        },
        "processes": {
          "href": "/v3/apps/guid-9c492bfa-146c-46b5-8d31-2368b11221d5/processes"
        },
        "route_mappings": {
          "href": "/v3/apps/guid-9c492bfa-146c-46b5-8d31-2368b11221d5/route_mappings"
        },
        "packages": {
          "href": "/v3/apps/guid-9c492bfa-146c-46b5-8d31-2368b11221d5/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-9c492bfa-146c-46b5-8d31-2368b11221d5/droplets"
        },
        "tasks": {
          "href": "/v3/apps/guid-9c492bfa-146c-46b5-8d31-2368b11221d5/tasks"
        },
        "start": {
          "href": "/v3/apps/guid-9c492bfa-146c-46b5-8d31-2368b11221d5/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-9c492bfa-146c-46b5-8d31-2368b11221d5/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-9c492bfa-146c-46b5-8d31-2368b11221d5/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.015851
Content-Length: 4082