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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0MCIsImVtYWlsIjoiZW1haWwtODZAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0MTY2MjU5OX0.jWUgxGa15EdLrW8cujQkQfn-5CPGx4mgTwASCYnQ2EE
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.eyJ1c2VyX2lkIjoidWFhLWlkLTE0MCIsImVtYWlsIjoiZW1haWwtODZAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0MTY2MjU5OX0.jWUgxGa15EdLrW8cujQkQfn-5CPGx4mgTwASCYnQ2EE" \
	-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-3bd82e5a-db67-4ddc-9209-829fc7a10702",
      "name": "my_app3",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": "name-395",
      "created_at": "1970-01-01T00:00:03Z",
      "updated_at": null,
      "environment_variables": {
        "magic": "beautiful"
      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-3bd82e5a-db67-4ddc-9209-829fc7a10702"
        },
        "space": {
          "href": "/v2/spaces/31163f3c-6ac0-4470-8ea5-5f8c2fada901"
        },
        "processes": {
          "href": "/v3/apps/guid-3bd82e5a-db67-4ddc-9209-829fc7a10702/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-3bd82e5a-db67-4ddc-9209-829fc7a10702/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-3bd82e5a-db67-4ddc-9209-829fc7a10702/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-3bd82e5a-db67-4ddc-9209-829fc7a10702/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-3bd82e5a-db67-4ddc-9209-829fc7a10702/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-3bd82e5a-db67-4ddc-9209-829fc7a10702/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-3bd82e5a-db67-4ddc-9209-829fc7a10702/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-593859e5-e133-42be-86d9-7d5cda7d9567",
      "name": "my_app2",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": null,
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-593859e5-e133-42be-86d9-7d5cda7d9567"
        },
        "space": {
          "href": "/v2/spaces/31163f3c-6ac0-4470-8ea5-5f8c2fada901"
        },
        "processes": {
          "href": "/v3/apps/guid-593859e5-e133-42be-86d9-7d5cda7d9567/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-593859e5-e133-42be-86d9-7d5cda7d9567/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-593859e5-e133-42be-86d9-7d5cda7d9567/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-593859e5-e133-42be-86d9-7d5cda7d9567/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-593859e5-e133-42be-86d9-7d5cda7d9567/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-593859e5-e133-42be-86d9-7d5cda7d9567/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-593859e5-e133-42be-86d9-7d5cda7d9567/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 42c6bdeb-351e-4043-afea-f5c453f9f7eb
Content-Length: 3251
X-Content-Type-Options: nosniff