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=f5b75b29-e754-4fea-a9a3-2be49b2eb279%2C9be47960-830c-4afd-b56c-360a1c72c608%2Cac0a165f-d3d7-4d8f-8c71-dd0cdb1e15c1&page=1&per_page=2&order_by=-created_at

Parameters

Name Description Valid Values Example Values
names Names of apps to filter by
  • array of strings
  • names=name1,name2
space_guids Spaces to filter by
  • array of strings
  • space_guids=space_guid1,space_guid2
organization_guids Organizations to filter by
  • array of strings
  • organization_guids=org_guid1,org_guid2
guids App guids to filter by
  • array of strings
  • guid=guid1,guid2
page Page to display
  • >= 1
per_page Number of results per page
  • 1 - 5000
order_by Value to sort by. Prepend with "+" or "-" to change sort direction to ascending or descending, respectively.
  • created_at, updated_at
names: my_app1
space_guids: f5b75b29-e754-4fea-a9a3-2be49b2eb279,9be47960-830c-4afd-b56c-360a1c72c608,ac0a165f-d3d7-4d8f-8c71-dd0cdb1e15c1
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MCIsImVtYWlsIjoiZW1haWwtMTM3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NDR9.1w-MRGVcwCwpGOJW83uTtlj1I6-6kzY7AZ26RpHrttg
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names=my_app1&space_guids=f5b75b29-e754-4fea-a9a3-2be49b2eb279%2C9be47960-830c-4afd-b56c-360a1c72c608%2Cac0a165f-d3d7-4d8f-8c71-dd0cdb1e15c1&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MCIsImVtYWlsIjoiZW1haWwtMTM3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NDR9.1w-MRGVcwCwpGOJW83uTtlj1I6-6kzY7AZ26RpHrttg" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=1&per_page=2&space_guids=f5b75b29-e754-4fea-a9a3-2be49b2eb279%2C9be47960-830c-4afd-b56c-360a1c72c608%2Cac0a165f-d3d7-4d8f-8c71-dd0cdb1e15c1"
    },
    "last": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=f5b75b29-e754-4fea-a9a3-2be49b2eb279%2C9be47960-830c-4afd-b56c-360a1c72c608%2Cac0a165f-d3d7-4d8f-8c71-dd0cdb1e15c1"
    },
    "next": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=f5b75b29-e754-4fea-a9a3-2be49b2eb279%2C9be47960-830c-4afd-b56c-360a1c72c608%2Cac0a165f-d3d7-4d8f-8c71-dd0cdb1e15c1"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-77eb9449-f910-426c-b187-5051da9ecb4e",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": null,
      "created_at": "2015-09-30T23:30:44Z",
      "updated_at": null,
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-77eb9449-f910-426c-b187-5051da9ecb4e"
        },
        "space": {
          "href": "/v2/spaces/f5b75b29-e754-4fea-a9a3-2be49b2eb279"
        },
        "processes": {
          "href": "/v3/apps/guid-77eb9449-f910-426c-b187-5051da9ecb4e/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-77eb9449-f910-426c-b187-5051da9ecb4e/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-77eb9449-f910-426c-b187-5051da9ecb4e/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-77eb9449-f910-426c-b187-5051da9ecb4e/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-77eb9449-f910-426c-b187-5051da9ecb4e/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-77eb9449-f910-426c-b187-5051da9ecb4e/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-77eb9449-f910-426c-b187-5051da9ecb4e/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-6395ea3d-8dbb-4fc6-aae2-6e5f105d18dc",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": null,
      "created_at": "2015-09-30T23:30:44Z",
      "updated_at": null,
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-6395ea3d-8dbb-4fc6-aae2-6e5f105d18dc"
        },
        "space": {
          "href": "/v2/spaces/ac0a165f-d3d7-4d8f-8c71-dd0cdb1e15c1"
        },
        "processes": {
          "href": "/v3/apps/guid-6395ea3d-8dbb-4fc6-aae2-6e5f105d18dc/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-6395ea3d-8dbb-4fc6-aae2-6e5f105d18dc/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-6395ea3d-8dbb-4fc6-aae2-6e5f105d18dc/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-6395ea3d-8dbb-4fc6-aae2-6e5f105d18dc/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-6395ea3d-8dbb-4fc6-aae2-6e5f105d18dc/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-6395ea3d-8dbb-4fc6-aae2-6e5f105d18dc/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-6395ea3d-8dbb-4fc6-aae2-6e5f105d18dc/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c93819fd-0277-48b8-887c-a0973ad4ff6f
Content-Length: 3578
X-Content-Type-Options: nosniff