Home
Version 3
Apps API

Apps API

List all Apps

GET /v2/apps

Fields

Name Description Default Valid Values Example Values
name The name of the app.
  • my_super_app
memory The amount of memory each instance should have. In megabytes.
  • 1024
  • 512
instances The number of instances of the app to run. To ensure optimal availability, ensure there are at least 2 instances.
  • 2
  • 6
  • 10
disk_quota The maximum amount of disk available to an instance of an app. In megabytes.
  • 1204
  • 2048
space_guid The guid of the associated space.
  • guid-960f983c-5db0-4def-a102-26a4657c8b6f
stack_guid The guid of the associated stack. Uses the default system stack.
state The current desired state of the app. One of STOPPED or STARTED. STOPPED
  • STOPPED
  • STARTED
detected_start_command The command detected by the buildpack during staging.
command The command to start an app after it is staged (e.g. 'rails s -p $PORT' or 'java com.org.Server $PORT').
buildpack Buildpack to build the app. 3 options: a) Blank means autodetection; b) A Git Url pointing to a buildpack; c) Name of an installed buildpack.
  • https://github.com/virtualstaticvoid/heroku-buildpack-r.git
  • an_example_installed_buildpack
health_check_type Type of health check to perform. port
  • port
  • none
health_check_timeout Timeout for health checking of an staged app when starting up
docker_image Name of the Docker image containing the app
  • cloudfoundry/helloworld
  • registry.example.com:5000/user/repository/tag
environment_json Key/value pairs of all the environment variables to run in your app. Does not include any system or service variables.
production Deprecated. true
  • true
  • false
console Open the console port for the app (at $CONSOLE_PORT). false
  • true
  • false
debug Open the debug port for the app (at $DEBUG_PORT). false
  • true
  • false

Parameters

Name Description Valid Values Example Values
q Parameters used to filter the result set.
Format queries as <filter><op><value>
Valid ops: : >= <= < > IN
Valid filters: name, space_guid, organization_guid
  • q=filter:value
  • q=filter>value
  • q=filter IN a,b,c
page Page of results to fetch
results-per-page Number of results per page
order-direction Order of the results: asc (default) or desc
inline-relations-depth 0 - don't inline any relations and return URLs. Otherwise, inline to depth N.
orphan-relations 0 - de-duplicate object entries in response
exclude-relations comma-delimited list of relations to drop from response
include-relations comma-delimited list of the only relations to include in response

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzOSIsImVtYWlsIjoiZW1haWwtOTFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQxOTk4OTk2N30.y5ZhcBBMuALrhdYVpS_2M_L_IMiclgHJVQHE93NP-5g
Host: example.org
Cookie: 

Route

GET /v2/apps

cURL

curl "https://api.[your-domain.com]/v2/apps" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzOSIsImVtYWlsIjoiZW1haWwtOTFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQxOTk4OTk2N30.y5ZhcBBMuALrhdYVpS_2M_L_IMiclgHJVQHE93NP-5g" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 7a1114cd-f5af-4467-8888-c7450457c58c
Content-Length: 4641
X-Content-Type-Options: nosniff

Status

200 OK

Body

{
  "total_results": 3,
  "total_pages": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [
    {
      "metadata": {
        "guid": "530d1b21-b66f-44e3-91b0-362743a7df8e",
        "url": "/v2/apps/530d1b21-b66f-44e3-91b0-362743a7df8e",
        "created_at": "2014-12-24T01:39:27+00:00",
        "updated_at": "2014-12-24T01:39:27+00:00"
      },
      "entity": {
        "name": "name-1058",
        "production": false,
        "space_guid": "7053d127-4b95-438c-9900-b3ab8ebd6b93",
        "stack_guid": "92f37beb-20c8-48f1-a158-7aba2a212e1b",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "4f24ca2b-2f48-4465-8e83-d923708b0d7c",
        "command": null,
        "console": false,
        "debug": null,
        "staging_task_id": null,
        "package_state": "PENDING",
        "health_check_type": "port",
        "health_check_timeout": null,
        "staging_failed_reason": null,
        "docker_image": null,
        "package_updated_at": "2014-12-24T01:39:27+00:00",
        "detected_start_command": "",
        "space_url": "/v2/spaces/7053d127-4b95-438c-9900-b3ab8ebd6b93",
        "stack_url": "/v2/stacks/92f37beb-20c8-48f1-a158-7aba2a212e1b",
        "events_url": "/v2/apps/530d1b21-b66f-44e3-91b0-362743a7df8e/events",
        "service_bindings_url": "/v2/apps/530d1b21-b66f-44e3-91b0-362743a7df8e/service_bindings",
        "routes_url": "/v2/apps/530d1b21-b66f-44e3-91b0-362743a7df8e/routes"
      }
    },
    {
      "metadata": {
        "guid": "5e29f071-0771-41f7-b3bb-0c086e39e79a",
        "url": "/v2/apps/5e29f071-0771-41f7-b3bb-0c086e39e79a",
        "created_at": "2014-12-24T01:39:27+00:00",
        "updated_at": "2014-12-24T01:39:27+00:00"
      },
      "entity": {
        "name": "name-1053",
        "production": false,
        "space_guid": "234ab9b1-6cc0-4810-b76e-708f8bfa40c5",
        "stack_guid": "d2d303f7-665e-4d1b-a7bd-2c1de1c8d337",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "f3a4ed4d-767e-4860-a70b-7781f94f6ae5",
        "command": null,
        "console": false,
        "debug": null,
        "staging_task_id": null,
        "package_state": "PENDING",
        "health_check_type": "port",
        "health_check_timeout": null,
        "staging_failed_reason": null,
        "docker_image": null,
        "package_updated_at": "2014-12-24T01:39:27+00:00",
        "detected_start_command": "",
        "space_url": "/v2/spaces/234ab9b1-6cc0-4810-b76e-708f8bfa40c5",
        "stack_url": "/v2/stacks/d2d303f7-665e-4d1b-a7bd-2c1de1c8d337",
        "events_url": "/v2/apps/5e29f071-0771-41f7-b3bb-0c086e39e79a/events",
        "service_bindings_url": "/v2/apps/5e29f071-0771-41f7-b3bb-0c086e39e79a/service_bindings",
        "routes_url": "/v2/apps/5e29f071-0771-41f7-b3bb-0c086e39e79a/routes"
      }
    },
    {
      "metadata": {
        "guid": "962e30b7-8393-43c3-af93-757d7f0e0a5e",
        "url": "/v2/apps/962e30b7-8393-43c3-af93-757d7f0e0a5e",
        "created_at": "2014-12-24T01:39:27+00:00",
        "updated_at": "2014-12-24T01:39:27+00:00"
      },
      "entity": {
        "name": "name-1063",
        "production": false,
        "space_guid": "57a1451b-c3df-4883-b907-28619f1973bb",
        "stack_guid": "48c8ae13-775a-438a-a7c9-38c4f0839f26",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "a7b82afb-21b5-436d-8fd7-a0d18ada56bd",
        "command": null,
        "console": false,
        "debug": null,
        "staging_task_id": null,
        "package_state": "PENDING",
        "health_check_type": "port",
        "health_check_timeout": null,
        "staging_failed_reason": null,
        "docker_image": null,
        "package_updated_at": "2014-12-24T01:39:27+00:00",
        "detected_start_command": "",
        "space_url": "/v2/spaces/57a1451b-c3df-4883-b907-28619f1973bb",
        "stack_url": "/v2/stacks/48c8ae13-775a-438a-a7c9-38c4f0839f26",
        "events_url": "/v2/apps/962e30b7-8393-43c3-af93-757d7f0e0a5e/events",
        "service_bindings_url": "/v2/apps/962e30b7-8393-43c3-af93-757d7f0e0a5e/service_bindings",
        "routes_url": "/v2/apps/962e30b7-8393-43c3-af93-757d7f0e0a5e/routes"
      }
    }
  ]
}