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[]=8b4f512e-cebb-41d4-ab44-8f42aa874bda&space_guids[]=5ef6df41-ec28-4637-b3c8-3bfdf8c254a1&space_guids[]=05ab0cb4-38a2-4dd2-b7eb-f782ff717440&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: ["8b4f512e-cebb-41d4-ab44-8f42aa874bda", "5ef6df41-ec28-4637-b3c8-3bfdf8c254a1", "05ab0cb4-38a2-4dd2-b7eb-f782ff717440"]
page: 1
per_page: 2
order_by: created_at
order_direction: desc

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5NyIsImVtYWlsIjoiZW1haWwtMjI0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzIzMTM2MjF9.bvnO_Esl2RAptG-phzp-Jpp4ol2NGHXpcCxrURrJfo4
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names[]=my_app1&space_guids[]=8b4f512e-cebb-41d4-ab44-8f42aa874bda&space_guids[]=5ef6df41-ec28-4637-b3c8-3bfdf8c254a1&space_guids[]=05ab0cb4-38a2-4dd2-b7eb-f782ff717440&page=1&per_page=2&order_by=created_at&order_direction=desc" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5NyIsImVtYWlsIjoiZW1haWwtMjI0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzIzMTM2MjF9.bvnO_Esl2RAptG-phzp-Jpp4ol2NGHXpcCxrURrJfo4" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=8b4f512e-cebb-41d4-ab44-8f42aa874bda&space_guids[]=5ef6df41-ec28-4637-b3c8-3bfdf8c254a1&space_guids[]=05ab0cb4-38a2-4dd2-b7eb-f782ff717440&order_by=created_at&order_direction=desc&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=8b4f512e-cebb-41d4-ab44-8f42aa874bda&space_guids[]=5ef6df41-ec28-4637-b3c8-3bfdf8c254a1&space_guids[]=05ab0cb4-38a2-4dd2-b7eb-f782ff717440&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "next": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=8b4f512e-cebb-41d4-ab44-8f42aa874bda&space_guids[]=5ef6df41-ec28-4637-b3c8-3bfdf8c254a1&space_guids[]=05ab0cb4-38a2-4dd2-b7eb-f782ff717440&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-113383d5-0ca5-4a7f-b8a8-544a9e67ce56",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2015-05-15T16:53:41Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-113383d5-0ca5-4a7f-b8a8-544a9e67ce56"
        },
        "processes": {
          "href": "/v3/apps/guid-113383d5-0ca5-4a7f-b8a8-544a9e67ce56/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-113383d5-0ca5-4a7f-b8a8-544a9e67ce56/packages"
        },
        "space": {
          "href": "/v2/spaces/8b4f512e-cebb-41d4-ab44-8f42aa874bda"
        },
        "start": {
          "href": "/v3/apps/guid-113383d5-0ca5-4a7f-b8a8-544a9e67ce56/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-113383d5-0ca5-4a7f-b8a8-544a9e67ce56/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-113383d5-0ca5-4a7f-b8a8-544a9e67ce56/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-f38118f6-266a-40d8-a22f-1ef6e3535764",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2015-05-15T16:53:41Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-f38118f6-266a-40d8-a22f-1ef6e3535764"
        },
        "processes": {
          "href": "/v3/apps/guid-f38118f6-266a-40d8-a22f-1ef6e3535764/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-f38118f6-266a-40d8-a22f-1ef6e3535764/packages"
        },
        "space": {
          "href": "/v2/spaces/05ab0cb4-38a2-4dd2-b7eb-f782ff717440"
        },
        "start": {
          "href": "/v3/apps/guid-f38118f6-266a-40d8-a22f-1ef6e3535764/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-f38118f6-266a-40d8-a22f-1ef6e3535764/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-f38118f6-266a-40d8-a22f-1ef6e3535764/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 4ae2042f-c87e-46e5-bc73-7962354688a0
Content-Length: 3230
X-Content-Type-Options: nosniff