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[]=0c15b498-1697-44bb-8e60-256ad28ce9e8&space_guids[]=ebcb8259-224c-4c0c-83db-a61ef6c77404&space_guids[]=f62f1635-7327-4a3e-920a-4d876fa9984d&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: ["0c15b498-1697-44bb-8e60-256ad28ce9e8", "ebcb8259-224c-4c0c-83db-a61ef6c77404", "f62f1635-7327-4a3e-920a-4d876fa9984d"]
page: 1
per_page: 2
order_by: created_at
order_direction: desc

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1OSIsImVtYWlsIjoiZW1haWwtMzI3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NTR9.5-kpWMwKxDBQPzskrugWKFqjh8Ld-R7dswhSBSmeavA
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names[]=my_app1&space_guids[]=0c15b498-1697-44bb-8e60-256ad28ce9e8&space_guids[]=ebcb8259-224c-4c0c-83db-a61ef6c77404&space_guids[]=f62f1635-7327-4a3e-920a-4d876fa9984d&page=1&per_page=2&order_by=created_at&order_direction=desc" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1OSIsImVtYWlsIjoiZW1haWwtMzI3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NTR9.5-kpWMwKxDBQPzskrugWKFqjh8Ld-R7dswhSBSmeavA" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=0c15b498-1697-44bb-8e60-256ad28ce9e8&space_guids[]=ebcb8259-224c-4c0c-83db-a61ef6c77404&space_guids[]=f62f1635-7327-4a3e-920a-4d876fa9984d&order_by=created_at&order_direction=desc&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=0c15b498-1697-44bb-8e60-256ad28ce9e8&space_guids[]=ebcb8259-224c-4c0c-83db-a61ef6c77404&space_guids[]=f62f1635-7327-4a3e-920a-4d876fa9984d&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "next": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=0c15b498-1697-44bb-8e60-256ad28ce9e8&space_guids[]=ebcb8259-224c-4c0c-83db-a61ef6c77404&space_guids[]=f62f1635-7327-4a3e-920a-4d876fa9984d&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-acc30b13-43e8-4f26-916f-5e506dc63d7b",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": null,
      "created_at": "2015-09-11T18:39:14Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-acc30b13-43e8-4f26-916f-5e506dc63d7b"
        },
        "space": {
          "href": "/v2/spaces/0c15b498-1697-44bb-8e60-256ad28ce9e8"
        },
        "processes": {
          "href": "/v3/apps/guid-acc30b13-43e8-4f26-916f-5e506dc63d7b/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-acc30b13-43e8-4f26-916f-5e506dc63d7b/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-acc30b13-43e8-4f26-916f-5e506dc63d7b/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-acc30b13-43e8-4f26-916f-5e506dc63d7b/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-acc30b13-43e8-4f26-916f-5e506dc63d7b/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-acc30b13-43e8-4f26-916f-5e506dc63d7b/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-acc30b13-43e8-4f26-916f-5e506dc63d7b/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-e650248e-00cd-47b0-8d7a-8ad179908329",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": null,
      "created_at": "2015-09-11T18:39:14Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-e650248e-00cd-47b0-8d7a-8ad179908329"
        },
        "space": {
          "href": "/v2/spaces/f62f1635-7327-4a3e-920a-4d876fa9984d"
        },
        "processes": {
          "href": "/v3/apps/guid-e650248e-00cd-47b0-8d7a-8ad179908329/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-e650248e-00cd-47b0-8d7a-8ad179908329/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-e650248e-00cd-47b0-8d7a-8ad179908329/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-e650248e-00cd-47b0-8d7a-8ad179908329/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-e650248e-00cd-47b0-8d7a-8ad179908329/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-e650248e-00cd-47b0-8d7a-8ad179908329/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-e650248e-00cd-47b0-8d7a-8ad179908329/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 8df1af3f-0f87-49e0-9e4d-4b4126ca67a4
Content-Length: 3724
X-Content-Type-Options: nosniff