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=e25dbbe0-d629-4e29-bc67-2bb9a9e60b4b%2Ca0dbbc5b-ae5c-46ac-a180-a15b610417e5%2Ca60a7b6d-4a71-4a2d-a0c0-7d0d056d5595&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: e25dbbe0-d629-4e29-bc67-2bb9a9e60b4b,a0dbbc5b-ae5c-46ac-a180-a15b610417e5,a60a7b6d-4a71-4a2d-a0c0-7d0d056d5595
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMiLCJlbWFpbCI6ImVtYWlsLTJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NzExNjgyNH0.AyPvJMwUCW_YJ1frJifXjIoz-8p1HGRNbD1YIQOgWYY
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names=my_app1&space_guids=e25dbbe0-d629-4e29-bc67-2bb9a9e60b4b%2Ca0dbbc5b-ae5c-46ac-a180-a15b610417e5%2Ca60a7b6d-4a71-4a2d-a0c0-7d0d056d5595&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMiLCJlbWFpbCI6ImVtYWlsLTJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NzExNjgyNH0.AyPvJMwUCW_YJ1frJifXjIoz-8p1HGRNbD1YIQOgWYY" \
	-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=e25dbbe0-d629-4e29-bc67-2bb9a9e60b4b%2Ca0dbbc5b-ae5c-46ac-a180-a15b610417e5%2Ca60a7b6d-4a71-4a2d-a0c0-7d0d056d5595"
    },
    "last": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=e25dbbe0-d629-4e29-bc67-2bb9a9e60b4b%2Ca0dbbc5b-ae5c-46ac-a180-a15b610417e5%2Ca60a7b6d-4a71-4a2d-a0c0-7d0d056d5595"
    },
    "next": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=e25dbbe0-d629-4e29-bc67-2bb9a9e60b4b%2Ca0dbbc5b-ae5c-46ac-a180-a15b610417e5%2Ca60a7b6d-4a71-4a2d-a0c0-7d0d056d5595"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-1f9a8745-c87a-405c-9570-e570d8756a31",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2015-11-03T00:53:43Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-37",
          "stack": "name-38"
        }
      },
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-1f9a8745-c87a-405c-9570-e570d8756a31"
        },
        "space": {
          "href": "/v2/spaces/e25dbbe0-d629-4e29-bc67-2bb9a9e60b4b"
        },
        "processes": {
          "href": "/v3/apps/guid-1f9a8745-c87a-405c-9570-e570d8756a31/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-1f9a8745-c87a-405c-9570-e570d8756a31/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-1f9a8745-c87a-405c-9570-e570d8756a31/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-1f9a8745-c87a-405c-9570-e570d8756a31/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-1f9a8745-c87a-405c-9570-e570d8756a31/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-1f9a8745-c87a-405c-9570-e570d8756a31/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-1f9a8745-c87a-405c-9570-e570d8756a31/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-3c3e1bf7-3658-4d09-b75a-7991bad4722f",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2015-11-03T00:53:43Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-39",
          "stack": "name-40"
        }
      },
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-3c3e1bf7-3658-4d09-b75a-7991bad4722f"
        },
        "space": {
          "href": "/v2/spaces/a60a7b6d-4a71-4a2d-a0c0-7d0d056d5595"
        },
        "processes": {
          "href": "/v3/apps/guid-3c3e1bf7-3658-4d09-b75a-7991bad4722f/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-3c3e1bf7-3658-4d09-b75a-7991bad4722f/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-3c3e1bf7-3658-4d09-b75a-7991bad4722f/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-3c3e1bf7-3658-4d09-b75a-7991bad4722f/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-3c3e1bf7-3658-4d09-b75a-7991bad4722f/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-3c3e1bf7-3658-4d09-b75a-7991bad4722f/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-3c3e1bf7-3658-4d09-b75a-7991bad4722f/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: dcb8ed06-de21-42cf-90e2-1c53e59a03dd
Content-Length: 3828
X-Content-Type-Options: nosniff