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[]=6ef343d1-3a26-46e5-bb5d-1b5292fe7c9f&space_guids[]=a6dcb824-56ab-4a62-8855-87fbd22b2108&space_guids[]=5fecfd09-ba2e-4f51-b3a9-eaf89ea363a7&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: ["6ef343d1-3a26-46e5-bb5d-1b5292fe7c9f", "a6dcb824-56ab-4a62-8855-87fbd22b2108", "5fecfd09-ba2e-4f51-b3a9-eaf89ea363a7"]
page: 1
per_page: 2
order_by: created_at
order_direction: desc

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0MSIsImVtYWlsIjoiZW1haWwtODdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0MTY2MjU5OX0.4lk7-e-yni3HpxzDQNGYM9E1zarTRC2WYPq4x1H5C4Q
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names[]=my_app1&space_guids[]=6ef343d1-3a26-46e5-bb5d-1b5292fe7c9f&space_guids[]=a6dcb824-56ab-4a62-8855-87fbd22b2108&space_guids[]=5fecfd09-ba2e-4f51-b3a9-eaf89ea363a7&page=1&per_page=2&order_by=created_at&order_direction=desc" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0MSIsImVtYWlsIjoiZW1haWwtODdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0MTY2MjU5OX0.4lk7-e-yni3HpxzDQNGYM9E1zarTRC2WYPq4x1H5C4Q" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=6ef343d1-3a26-46e5-bb5d-1b5292fe7c9f&space_guids[]=a6dcb824-56ab-4a62-8855-87fbd22b2108&space_guids[]=5fecfd09-ba2e-4f51-b3a9-eaf89ea363a7&order_by=created_at&order_direction=desc&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=6ef343d1-3a26-46e5-bb5d-1b5292fe7c9f&space_guids[]=a6dcb824-56ab-4a62-8855-87fbd22b2108&space_guids[]=5fecfd09-ba2e-4f51-b3a9-eaf89ea363a7&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "next": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=6ef343d1-3a26-46e5-bb5d-1b5292fe7c9f&space_guids[]=a6dcb824-56ab-4a62-8855-87fbd22b2108&space_guids[]=5fecfd09-ba2e-4f51-b3a9-eaf89ea363a7&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-b3903be5-ef52-45d5-858c-a577d5341727",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": null,
      "created_at": "2015-08-31T21:49:59Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-b3903be5-ef52-45d5-858c-a577d5341727"
        },
        "space": {
          "href": "/v2/spaces/6ef343d1-3a26-46e5-bb5d-1b5292fe7c9f"
        },
        "processes": {
          "href": "/v3/apps/guid-b3903be5-ef52-45d5-858c-a577d5341727/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-b3903be5-ef52-45d5-858c-a577d5341727/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-b3903be5-ef52-45d5-858c-a577d5341727/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-b3903be5-ef52-45d5-858c-a577d5341727/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-b3903be5-ef52-45d5-858c-a577d5341727/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-b3903be5-ef52-45d5-858c-a577d5341727/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-b3903be5-ef52-45d5-858c-a577d5341727/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-e5dbaa5f-0963-47cf-97f7-11d43014f6ed",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": null,
      "created_at": "2015-08-31T21:49:59Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-e5dbaa5f-0963-47cf-97f7-11d43014f6ed"
        },
        "space": {
          "href": "/v2/spaces/5fecfd09-ba2e-4f51-b3a9-eaf89ea363a7"
        },
        "processes": {
          "href": "/v3/apps/guid-e5dbaa5f-0963-47cf-97f7-11d43014f6ed/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-e5dbaa5f-0963-47cf-97f7-11d43014f6ed/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-e5dbaa5f-0963-47cf-97f7-11d43014f6ed/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-e5dbaa5f-0963-47cf-97f7-11d43014f6ed/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-e5dbaa5f-0963-47cf-97f7-11d43014f6ed/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-e5dbaa5f-0963-47cf-97f7-11d43014f6ed/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-e5dbaa5f-0963-47cf-97f7-11d43014f6ed/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 23d4810a-d209-4f96-bb89-a9a5b6a908d9
Content-Length: 3724
X-Content-Type-Options: nosniff