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[]=2c242e15-a189-4223-888d-4bdd5fb1ea69&space_guids[]=27a75962-432e-4d6d-9e4c-7f8025554a7c&space_guids[]=6f6d29ec-22aa-4f65-8c8d-378ffcebaf73&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: ["2c242e15-a189-4223-888d-4bdd5fb1ea69", "27a75962-432e-4d6d-9e4c-7f8025554a7c", "6f6d29ec-22aa-4f65-8c8d-378ffcebaf73"]
page: 1
per_page: 2
order_by: created_at
order_direction: desc

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxNyIsImVtYWlsIjoiZW1haWwtMjE5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjkwMzg3MTR9.tjEbq4tj5wlJ_cDnK5q2q7UM03n6bQWwv3ZKnPtC7rA
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names[]=my_app1&space_guids[]=2c242e15-a189-4223-888d-4bdd5fb1ea69&space_guids[]=27a75962-432e-4d6d-9e4c-7f8025554a7c&space_guids[]=6f6d29ec-22aa-4f65-8c8d-378ffcebaf73&page=1&per_page=2&order_by=created_at&order_direction=desc" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxNyIsImVtYWlsIjoiZW1haWwtMjE5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjkwMzg3MTR9.tjEbq4tj5wlJ_cDnK5q2q7UM03n6bQWwv3ZKnPtC7rA" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=2c242e15-a189-4223-888d-4bdd5fb1ea69&space_guids[]=27a75962-432e-4d6d-9e4c-7f8025554a7c&space_guids[]=6f6d29ec-22aa-4f65-8c8d-378ffcebaf73&order_by=created_at&order_direction=desc&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=2c242e15-a189-4223-888d-4bdd5fb1ea69&space_guids[]=27a75962-432e-4d6d-9e4c-7f8025554a7c&space_guids[]=6f6d29ec-22aa-4f65-8c8d-378ffcebaf73&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "next": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=2c242e15-a189-4223-888d-4bdd5fb1ea69&space_guids[]=27a75962-432e-4d6d-9e4c-7f8025554a7c&space_guids[]=6f6d29ec-22aa-4f65-8c8d-378ffcebaf73&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-dbf49f7a-0e25-4b69-950c-a7f13fc9b597",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-dbf49f7a-0e25-4b69-950c-a7f13fc9b597"
        },
        "processes": {
          "href": "/v3/apps/guid-dbf49f7a-0e25-4b69-950c-a7f13fc9b597/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-dbf49f7a-0e25-4b69-950c-a7f13fc9b597/packages"
        },
        "space": {
          "href": "/v2/spaces/2c242e15-a189-4223-888d-4bdd5fb1ea69"
        },
        "start": {
          "href": "/v3/apps/guid-dbf49f7a-0e25-4b69-950c-a7f13fc9b597/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-dbf49f7a-0e25-4b69-950c-a7f13fc9b597/stop",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-2f619f0a-3c50-42c7-afc9-48f9bd130ecf",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-2f619f0a-3c50-42c7-afc9-48f9bd130ecf"
        },
        "processes": {
          "href": "/v3/apps/guid-2f619f0a-3c50-42c7-afc9-48f9bd130ecf/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-2f619f0a-3c50-42c7-afc9-48f9bd130ecf/packages"
        },
        "space": {
          "href": "/v2/spaces/6f6d29ec-22aa-4f65-8c8d-378ffcebaf73"
        },
        "start": {
          "href": "/v3/apps/guid-2f619f0a-3c50-42c7-afc9-48f9bd130ecf/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-2f619f0a-3c50-42c7-afc9-48f9bd130ecf/stop",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6216a5f6-38cf-416a-a271-db8e66652937
Content-Length: 2696
X-Content-Type-Options: nosniff