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[]=e2ff105d-b8dd-4e82-9175-f031dceb35cb&space_guids[]=cfb06514-8102-4054-b104-1e79b7724b20&space_guids[]=28967e2e-64a7-4101-9a35-9bdf01cc1ed9&page=1&per_page=2&order_by=created_at&order_direction=desc

Parameters

Name Description Valid Values Example Values
names Names of apps to filter by
  • array of strings
  • names[]=name1&names[]=name2
space_guids Spaces to filter by
  • array of strings
  • space_guids[]=space_guid1&space_guids[]=space_guid2
organization_guids Organizations to filter by
  • array of strings
  • organization_guids[]=org_guid1&organization_guids[]=org_guid2
guids App guids to filter by
  • array of strings
  • guid[]=guid1&guid[]=guid2
page Page to display
  • >= 1
per_page Number of results per page
  • 1 - 5000
order_by Value to sort by
  • created_at, updated_at
order_direction Direction to sort by
  • asc, desc
names: ["my_app1"]
space_guids: ["e2ff105d-b8dd-4e82-9175-f031dceb35cb", "cfb06514-8102-4054-b104-1e79b7724b20", "28967e2e-64a7-4101-9a35-9bdf01cc1ed9"]
page: 1
per_page: 2
order_by: created_at
order_direction: desc

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MiIsImVtYWlsIjoiZW1haWwtMTA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTV9.gTCw3Ej_GOIh7ULReEx23orpqoA1icWQMqXrt5nHK84
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names[]=my_app1&space_guids[]=e2ff105d-b8dd-4e82-9175-f031dceb35cb&space_guids[]=cfb06514-8102-4054-b104-1e79b7724b20&space_guids[]=28967e2e-64a7-4101-9a35-9bdf01cc1ed9&page=1&per_page=2&order_by=created_at&order_direction=desc" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MiIsImVtYWlsIjoiZW1haWwtMTA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTV9.gTCw3Ej_GOIh7ULReEx23orpqoA1icWQMqXrt5nHK84" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=e2ff105d-b8dd-4e82-9175-f031dceb35cb&space_guids[]=cfb06514-8102-4054-b104-1e79b7724b20&space_guids[]=28967e2e-64a7-4101-9a35-9bdf01cc1ed9&order_by=created_at&order_direction=desc&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=e2ff105d-b8dd-4e82-9175-f031dceb35cb&space_guids[]=cfb06514-8102-4054-b104-1e79b7724b20&space_guids[]=28967e2e-64a7-4101-9a35-9bdf01cc1ed9&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "next": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=e2ff105d-b8dd-4e82-9175-f031dceb35cb&space_guids[]=cfb06514-8102-4054-b104-1e79b7724b20&space_guids[]=28967e2e-64a7-4101-9a35-9bdf01cc1ed9&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-ef02213b-cfe8-454b-965c-cd2b003b7e58",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": null,
      "created_at": "2015-07-27T22:43:15Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-ef02213b-cfe8-454b-965c-cd2b003b7e58"
        },
        "processes": {
          "href": "/v3/apps/guid-ef02213b-cfe8-454b-965c-cd2b003b7e58/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-ef02213b-cfe8-454b-965c-cd2b003b7e58/packages"
        },
        "space": {
          "href": "/v2/spaces/e2ff105d-b8dd-4e82-9175-f031dceb35cb"
        },
        "start": {
          "href": "/v3/apps/guid-ef02213b-cfe8-454b-965c-cd2b003b7e58/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-ef02213b-cfe8-454b-965c-cd2b003b7e58/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-ef02213b-cfe8-454b-965c-cd2b003b7e58/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-566fac0d-efe0-40dd-b6a2-9c1ea5ba4221",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": null,
      "created_at": "2015-07-27T22:43:15Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-566fac0d-efe0-40dd-b6a2-9c1ea5ba4221"
        },
        "processes": {
          "href": "/v3/apps/guid-566fac0d-efe0-40dd-b6a2-9c1ea5ba4221/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-566fac0d-efe0-40dd-b6a2-9c1ea5ba4221/packages"
        },
        "space": {
          "href": "/v2/spaces/28967e2e-64a7-4101-9a35-9bdf01cc1ed9"
        },
        "start": {
          "href": "/v3/apps/guid-566fac0d-efe0-40dd-b6a2-9c1ea5ba4221/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-566fac0d-efe0-40dd-b6a2-9c1ea5ba4221/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-566fac0d-efe0-40dd-b6a2-9c1ea5ba4221/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 87391e45-75de-4727-bf58-4d9f870e9b3e
Content-Length: 3280
X-Content-Type-Options: nosniff