Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

List all Apps

GET /v3/apps

Request

Route

GET /v3/apps?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
page: 1
per_page: 2
order_by: created_at
order_direction: desc

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxNiIsImVtYWlsIjoiZW1haWwtMjE4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjkwMzg3MTR9.a6uy0K120RwtcIhCLfo4dFPnXCIZ2LcKaS2_vHHDcbA
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?page=1&per_page=2&order_by=created_at&order_direction=desc" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxNiIsImVtYWlsIjoiZW1haWwtMjE4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjkwMzg3MTR9.a6uy0K120RwtcIhCLfo4dFPnXCIZ2LcKaS2_vHHDcbA" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?order_by=created_at&order_direction=desc&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps?order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "next": {
      "href": "/v3/apps?order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-e3dcc958-29c8-4a69-83bd-297e40532356",
      "name": "my_app3",
      "desired_state": "STOPPED",
      "environment_variables": {
        "magic": "beautiful"
      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-e3dcc958-29c8-4a69-83bd-297e40532356"
        },
        "processes": {
          "href": "/v3/apps/guid-e3dcc958-29c8-4a69-83bd-297e40532356/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-e3dcc958-29c8-4a69-83bd-297e40532356/packages"
        },
        "space": {
          "href": "/v2/spaces/e089eda0-f073-48c7-a6fa-6f3f59840a65"
        },
        "start": {
          "href": "/v3/apps/guid-e3dcc958-29c8-4a69-83bd-297e40532356/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-e3dcc958-29c8-4a69-83bd-297e40532356/stop",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-5557d2b7-1d1b-4ebc-b118-e4c5dd712e97",
      "name": "my_app2",
      "desired_state": "STOPPED",
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-5557d2b7-1d1b-4ebc-b118-e4c5dd712e97"
        },
        "processes": {
          "href": "/v3/apps/guid-5557d2b7-1d1b-4ebc-b118-e4c5dd712e97/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-5557d2b7-1d1b-4ebc-b118-e4c5dd712e97/packages"
        },
        "space": {
          "href": "/v2/spaces/e089eda0-f073-48c7-a6fa-6f3f59840a65"
        },
        "start": {
          "href": "/v3/apps/guid-5557d2b7-1d1b-4ebc-b118-e4c5dd712e97/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-5557d2b7-1d1b-4ebc-b118-e4c5dd712e97/stop",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 948e1a02-feff-4949-ae13-2bf6add6ca35
Content-Length: 2217
X-Content-Type-Options: nosniff