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[]=89c36f9d-3a71-4465-97fd-54af3e007ce8&space_guids[]=e0f151e9-837a-4507-bb64-1625136f25d7&space_guids[]=cc13f7d3-b137-4522-b00f-06d13ce5c774&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: ["89c36f9d-3a71-4465-97fd-54af3e007ce8", "e0f151e9-837a-4507-bb64-1625136f25d7", "cc13f7d3-b137-4522-b00f-06d13ce5c774"]
page: 1
per_page: 2
order_by: created_at
order_direction: desc

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NSIsImVtYWlsIjoiZW1haWwtMTYyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMTF9.5BigTizsrlS1NuoN_WeLqQEq4C8xoJWZDlcyF8b7Gdw
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names[]=my_app1&space_guids[]=89c36f9d-3a71-4465-97fd-54af3e007ce8&space_guids[]=e0f151e9-837a-4507-bb64-1625136f25d7&space_guids[]=cc13f7d3-b137-4522-b00f-06d13ce5c774&page=1&per_page=2&order_by=created_at&order_direction=desc" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NSIsImVtYWlsIjoiZW1haWwtMTYyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMTF9.5BigTizsrlS1NuoN_WeLqQEq4C8xoJWZDlcyF8b7Gdw" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=89c36f9d-3a71-4465-97fd-54af3e007ce8&space_guids[]=e0f151e9-837a-4507-bb64-1625136f25d7&space_guids[]=cc13f7d3-b137-4522-b00f-06d13ce5c774&order_by=created_at&order_direction=desc&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=89c36f9d-3a71-4465-97fd-54af3e007ce8&space_guids[]=e0f151e9-837a-4507-bb64-1625136f25d7&space_guids[]=cc13f7d3-b137-4522-b00f-06d13ce5c774&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "next": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=89c36f9d-3a71-4465-97fd-54af3e007ce8&space_guids[]=e0f151e9-837a-4507-bb64-1625136f25d7&space_guids[]=cc13f7d3-b137-4522-b00f-06d13ce5c774&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-01998ad5-5e70-4e16-8fb2-8361e457523b",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2015-06-04T00:05:11Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-01998ad5-5e70-4e16-8fb2-8361e457523b"
        },
        "processes": {
          "href": "/v3/apps/guid-01998ad5-5e70-4e16-8fb2-8361e457523b/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-01998ad5-5e70-4e16-8fb2-8361e457523b/packages"
        },
        "space": {
          "href": "/v2/spaces/89c36f9d-3a71-4465-97fd-54af3e007ce8"
        },
        "start": {
          "href": "/v3/apps/guid-01998ad5-5e70-4e16-8fb2-8361e457523b/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-01998ad5-5e70-4e16-8fb2-8361e457523b/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-01998ad5-5e70-4e16-8fb2-8361e457523b/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-3d9f301a-005e-4c26-956e-94d6ab475fc1",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2015-06-04T00:05:11Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-3d9f301a-005e-4c26-956e-94d6ab475fc1"
        },
        "processes": {
          "href": "/v3/apps/guid-3d9f301a-005e-4c26-956e-94d6ab475fc1/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-3d9f301a-005e-4c26-956e-94d6ab475fc1/packages"
        },
        "space": {
          "href": "/v2/spaces/cc13f7d3-b137-4522-b00f-06d13ce5c774"
        },
        "start": {
          "href": "/v3/apps/guid-3d9f301a-005e-4c26-956e-94d6ab475fc1/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-3d9f301a-005e-4c26-956e-94d6ab475fc1/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-3d9f301a-005e-4c26-956e-94d6ab475fc1/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f91907c2-1275-481a-a7ab-bcb33c9abbae
Content-Length: 3230
X-Content-Type-Options: nosniff