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=f505c2ba-46c5-40d7-a44c-2506c4f82bd6%2C9fa54ece-34f0-4eae-ba65-25e7f1c9f6cf%2C4771d168-a9ae-40cc-a21b-b4d2c7cbfe0b&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: f505c2ba-46c5-40d7-a44c-2506c4f82bd6,9fa54ece-34f0-4eae-ba65-25e7f1c9f6cf,4771d168-a9ae-40cc-a21b-b4d2c7cbfe0b
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MSIsImVtYWlsIjoiZW1haWwtMTE4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2ODV9.Gzj5RGEtJn3yclE0jwWhc3ydjIhJG0bWa3oRVb3rGBg
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names=my_app1&space_guids=f505c2ba-46c5-40d7-a44c-2506c4f82bd6%2C9fa54ece-34f0-4eae-ba65-25e7f1c9f6cf%2C4771d168-a9ae-40cc-a21b-b4d2c7cbfe0b&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MSIsImVtYWlsIjoiZW1haWwtMTE4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2ODV9.Gzj5RGEtJn3yclE0jwWhc3ydjIhJG0bWa3oRVb3rGBg" \
	-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=f505c2ba-46c5-40d7-a44c-2506c4f82bd6%2C9fa54ece-34f0-4eae-ba65-25e7f1c9f6cf%2C4771d168-a9ae-40cc-a21b-b4d2c7cbfe0b"
    },
    "last": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=f505c2ba-46c5-40d7-a44c-2506c4f82bd6%2C9fa54ece-34f0-4eae-ba65-25e7f1c9f6cf%2C4771d168-a9ae-40cc-a21b-b4d2c7cbfe0b"
    },
    "next": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=f505c2ba-46c5-40d7-a44c-2506c4f82bd6%2C9fa54ece-34f0-4eae-ba65-25e7f1c9f6cf%2C4771d168-a9ae-40cc-a21b-b4d2c7cbfe0b"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-afaaa107-5d05-451e-a5bd-e14c85932b05",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2015-12-22T18:28:05Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-631",
          "stack": "name-632"
        }
      },
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-afaaa107-5d05-451e-a5bd-e14c85932b05"
        },
        "space": {
          "href": "/v2/spaces/f505c2ba-46c5-40d7-a44c-2506c4f82bd6"
        },
        "processes": {
          "href": "/v3/apps/guid-afaaa107-5d05-451e-a5bd-e14c85932b05/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-afaaa107-5d05-451e-a5bd-e14c85932b05/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-afaaa107-5d05-451e-a5bd-e14c85932b05/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-afaaa107-5d05-451e-a5bd-e14c85932b05/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-afaaa107-5d05-451e-a5bd-e14c85932b05/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-afaaa107-5d05-451e-a5bd-e14c85932b05/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-afaaa107-5d05-451e-a5bd-e14c85932b05/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-5ada9834-7df5-4a11-a392-4b088a92ed2a",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2015-12-22T18:28:05Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-633",
          "stack": "name-634"
        }
      },
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-5ada9834-7df5-4a11-a392-4b088a92ed2a"
        },
        "space": {
          "href": "/v2/spaces/4771d168-a9ae-40cc-a21b-b4d2c7cbfe0b"
        },
        "processes": {
          "href": "/v3/apps/guid-5ada9834-7df5-4a11-a392-4b088a92ed2a/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-5ada9834-7df5-4a11-a392-4b088a92ed2a/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-5ada9834-7df5-4a11-a392-4b088a92ed2a/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-5ada9834-7df5-4a11-a392-4b088a92ed2a/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-5ada9834-7df5-4a11-a392-4b088a92ed2a/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-5ada9834-7df5-4a11-a392-4b088a92ed2a/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-5ada9834-7df5-4a11-a392-4b088a92ed2a/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.012910
Content-Length: 3832