Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

Filters apps by name and spaces and guids and orgs

GET /v3/apps

Request

Route

GET /v3/apps?names[]=my_app1&space_guids[]=28cde88a-3d90-4cf9-9cb6-fcc0ba1bc049&space_guids[]=c30e1246-f69e-41c0-8ab5-e38e844bd92f&space_guids[]=652f1851-2536-497e-86e2-7890ad1880bf&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: ["28cde88a-3d90-4cf9-9cb6-fcc0ba1bc049", "c30e1246-f69e-41c0-8ab5-e38e844bd92f", "652f1851-2536-497e-86e2-7890ad1880bf"]
page: 1
per_page: 2
order_by: created_at
order_direction: desc

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExNyIsImVtYWlsIjoiZW1haWwtNzlAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNzMyMzk2MH0.Gah-qGmw2y0UslxQLhrubUBdKC5AQnlwj7aEM78MNRU
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names[]=my_app1&space_guids[]=28cde88a-3d90-4cf9-9cb6-fcc0ba1bc049&space_guids[]=c30e1246-f69e-41c0-8ab5-e38e844bd92f&space_guids[]=652f1851-2536-497e-86e2-7890ad1880bf&page=1&per_page=2&order_by=created_at&order_direction=desc" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExNyIsImVtYWlsIjoiZW1haWwtNzlAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNzMyMzk2MH0.Gah-qGmw2y0UslxQLhrubUBdKC5AQnlwj7aEM78MNRU" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=28cde88a-3d90-4cf9-9cb6-fcc0ba1bc049&space_guids[]=c30e1246-f69e-41c0-8ab5-e38e844bd92f&space_guids[]=652f1851-2536-497e-86e2-7890ad1880bf&order_by=created_at&order_direction=desc&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=28cde88a-3d90-4cf9-9cb6-fcc0ba1bc049&space_guids[]=c30e1246-f69e-41c0-8ab5-e38e844bd92f&space_guids[]=652f1851-2536-497e-86e2-7890ad1880bf&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "next": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=28cde88a-3d90-4cf9-9cb6-fcc0ba1bc049&space_guids[]=c30e1246-f69e-41c0-8ab5-e38e844bd92f&space_guids[]=652f1851-2536-497e-86e2-7890ad1880bf&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-4665f8a4-c51c-4263-8afb-d845a0438812",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "_links": {
        "self": {
          "href": "/v3/apps/guid-4665f8a4-c51c-4263-8afb-d845a0438812"
        },
        "processes": {
          "href": "/v3/apps/guid-4665f8a4-c51c-4263-8afb-d845a0438812/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-4665f8a4-c51c-4263-8afb-d845a0438812/packages"
        },
        "space": {
          "href": "/v2/spaces/652f1851-2536-497e-86e2-7890ad1880bf"
        }
      }
    },
    {
      "guid": "guid-42fad27d-1ec6-4670-8b6f-ca684de36794",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "_links": {
        "self": {
          "href": "/v3/apps/guid-42fad27d-1ec6-4670-8b6f-ca684de36794"
        },
        "processes": {
          "href": "/v3/apps/guid-42fad27d-1ec6-4670-8b6f-ca684de36794/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-42fad27d-1ec6-4670-8b6f-ca684de36794/packages"
        },
        "space": {
          "href": "/v2/spaces/28cde88a-3d90-4cf9-9cb6-fcc0ba1bc049"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 8a990537-0ec6-4104-92e5-c12d60548986
Content-Length: 2078
X-Content-Type-Options: nosniff