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=a1218c62-db33-4304-a6c6-d3dc36264974%2Cd0705d71-9b5c-493b-a1e7-82c98479971c%2Ce4d4ec3c-2eea-4d20-9116-c44b5e49798d&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: a1218c62-db33-4304-a6c6-d3dc36264974,d0705d71-9b5c-493b-a1e7-82c98479971c,e4d4ec3c-2eea-4d20-9116-c44b5e49798d
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyNiIsImVtYWlsIjoiZW1haWwtMjk3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTQ0NTE2MzR9.bZ9H3D2i2VAA13buOj6EzLVFzxlQMF3isyEk9cy-OlE
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names=my_app1&space_guids=a1218c62-db33-4304-a6c6-d3dc36264974%2Cd0705d71-9b5c-493b-a1e7-82c98479971c%2Ce4d4ec3c-2eea-4d20-9116-c44b5e49798d&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyNiIsImVtYWlsIjoiZW1haWwtMjk3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTQ0NTE2MzR9.bZ9H3D2i2VAA13buOj6EzLVFzxlQMF3isyEk9cy-OlE" \
	-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=a1218c62-db33-4304-a6c6-d3dc36264974%2Cd0705d71-9b5c-493b-a1e7-82c98479971c%2Ce4d4ec3c-2eea-4d20-9116-c44b5e49798d"
    },
    "last": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=a1218c62-db33-4304-a6c6-d3dc36264974%2Cd0705d71-9b5c-493b-a1e7-82c98479971c%2Ce4d4ec3c-2eea-4d20-9116-c44b5e49798d"
    },
    "next": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=a1218c62-db33-4304-a6c6-d3dc36264974%2Cd0705d71-9b5c-493b-a1e7-82c98479971c%2Ce4d4ec3c-2eea-4d20-9116-c44b5e49798d"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-9e51a96e-00b6-46b9-905c-7d26bf29eca2",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2016-01-26T22:20:34Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-2399",
          "stack": "name-2400"
        }
      },
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-9e51a96e-00b6-46b9-905c-7d26bf29eca2"
        },
        "space": {
          "href": "/v2/spaces/a1218c62-db33-4304-a6c6-d3dc36264974"
        },
        "processes": {
          "href": "/v3/apps/guid-9e51a96e-00b6-46b9-905c-7d26bf29eca2/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-9e51a96e-00b6-46b9-905c-7d26bf29eca2/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-9e51a96e-00b6-46b9-905c-7d26bf29eca2/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-9e51a96e-00b6-46b9-905c-7d26bf29eca2/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-9e51a96e-00b6-46b9-905c-7d26bf29eca2/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-9e51a96e-00b6-46b9-905c-7d26bf29eca2/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-9e51a96e-00b6-46b9-905c-7d26bf29eca2/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-d7afbdb4-c1d7-4a13-a4d8-92e0eb2c59c8",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2016-01-26T22:20:34Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-2401",
          "stack": "name-2402"
        }
      },
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-d7afbdb4-c1d7-4a13-a4d8-92e0eb2c59c8"
        },
        "space": {
          "href": "/v2/spaces/e4d4ec3c-2eea-4d20-9116-c44b5e49798d"
        },
        "processes": {
          "href": "/v3/apps/guid-d7afbdb4-c1d7-4a13-a4d8-92e0eb2c59c8/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-d7afbdb4-c1d7-4a13-a4d8-92e0eb2c59c8/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-d7afbdb4-c1d7-4a13-a4d8-92e0eb2c59c8/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-d7afbdb4-c1d7-4a13-a4d8-92e0eb2c59c8/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-d7afbdb4-c1d7-4a13-a4d8-92e0eb2c59c8/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-d7afbdb4-c1d7-4a13-a4d8-92e0eb2c59c8/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-d7afbdb4-c1d7-4a13-a4d8-92e0eb2c59c8/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
X-Runtime: 0.016222
Content-Length: 3836