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-44eb99fb-3800-404a-bcc9-a2c77c0092a6
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.eyJ1c2VyX2lkIjoidWFhLWlkLTIxNSIsImVtYWlsIjoiZW1haWwtMTU2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjIzMjM1NDR9.OxjJYKZiWdKFQT65sld1o8IhktBdhMT7iy7S2oXUcgw
Host: example.org
Cookie: 

Route

GET /v2/apps

cURL

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

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b0339497-03e2-4bda-9ab5-41306503b062
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": "ad0b9e03-2d2f-4153-8dfd-e20d6bbb8bc2",
        "url": "/v2/apps/ad0b9e03-2d2f-4153-8dfd-e20d6bbb8bc2",
        "created_at": "2015-01-20T01:52:24+00:00",
        "updated_at": "2015-01-20T01:52:24+00:00"
      },
      "entity": {
        "name": "name-1456",
        "production": false,
        "space_guid": "af9bf9c3-895c-44ed-8f94-503006a8f975",
        "stack_guid": "668cbf93-cecf-4347-a5b9-075cd77a7f14",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "56221c84-692b-4081-9a0c-b0d7b46b55a4",
        "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": "2015-01-20T01:52:24+00:00",
        "detected_start_command": "",
        "space_url": "/v2/spaces/af9bf9c3-895c-44ed-8f94-503006a8f975",
        "stack_url": "/v2/stacks/668cbf93-cecf-4347-a5b9-075cd77a7f14",
        "events_url": "/v2/apps/ad0b9e03-2d2f-4153-8dfd-e20d6bbb8bc2/events",
        "service_bindings_url": "/v2/apps/ad0b9e03-2d2f-4153-8dfd-e20d6bbb8bc2/service_bindings",
        "routes_url": "/v2/apps/ad0b9e03-2d2f-4153-8dfd-e20d6bbb8bc2/routes"
      }
    },
    {
      "metadata": {
        "guid": "da1fc54c-9456-4244-80a7-f55c09656ab7",
        "url": "/v2/apps/da1fc54c-9456-4244-80a7-f55c09656ab7",
        "created_at": "2015-01-20T01:52:24+00:00",
        "updated_at": "2015-01-20T01:52:24+00:00"
      },
      "entity": {
        "name": "name-1466",
        "production": false,
        "space_guid": "7e7c99d3-a59d-4695-9242-60ead0774f41",
        "stack_guid": "45efebdb-a522-436d-8080-b5aa6e07a67e",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "d0c1e041-441e-423a-ad50-45c77b63218d",
        "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": "2015-01-20T01:52:24+00:00",
        "detected_start_command": "",
        "space_url": "/v2/spaces/7e7c99d3-a59d-4695-9242-60ead0774f41",
        "stack_url": "/v2/stacks/45efebdb-a522-436d-8080-b5aa6e07a67e",
        "events_url": "/v2/apps/da1fc54c-9456-4244-80a7-f55c09656ab7/events",
        "service_bindings_url": "/v2/apps/da1fc54c-9456-4244-80a7-f55c09656ab7/service_bindings",
        "routes_url": "/v2/apps/da1fc54c-9456-4244-80a7-f55c09656ab7/routes"
      }
    },
    {
      "metadata": {
        "guid": "e9d23fad-30c2-422e-9f2d-458ea75c3f6a",
        "url": "/v2/apps/e9d23fad-30c2-422e-9f2d-458ea75c3f6a",
        "created_at": "2015-01-20T01:52:24+00:00",
        "updated_at": "2015-01-20T01:52:24+00:00"
      },
      "entity": {
        "name": "name-1461",
        "production": false,
        "space_guid": "082da833-9e7c-450b-b01e-31135b9ed0bc",
        "stack_guid": "69d009b1-18be-484a-898f-bbd50c14bb88",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "69a9191d-4a56-4428-9970-4dab3ddf9bb3",
        "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": "2015-01-20T01:52:24+00:00",
        "detected_start_command": "",
        "space_url": "/v2/spaces/082da833-9e7c-450b-b01e-31135b9ed0bc",
        "stack_url": "/v2/stacks/69d009b1-18be-484a-898f-bbd50c14bb88",
        "events_url": "/v2/apps/e9d23fad-30c2-422e-9f2d-458ea75c3f6a/events",
        "service_bindings_url": "/v2/apps/e9d23fad-30c2-422e-9f2d-458ea75c3f6a/service_bindings",
        "routes_url": "/v2/apps/e9d23fad-30c2-422e-9f2d-458ea75c3f6a/routes"
      }
    }
  ]
}