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-5bae9144-1bc2-479b-a55d-9a2917d6a37b
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.eyJ1c2VyX2lkIjoidWFhLWlkLTI5MCIsImVtYWlsIjoiZW1haWwtMjMwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4ODJ9.MwG3YSWJUNTxNodVDoKJ6sAAx2ixbECJ9DzrByjBXNw
Host: example.org
Cookie: 

Route

GET /v2/apps

cURL

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

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 2a1789d3-78e2-4e75-9605-2893f58c8e62
Content-Length: 4596
X-Content-Type-Options: nosniff

Status

200 OK

Body

{
  "total_results": 3,
  "total_pages": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [
    {
      "metadata": {
        "guid": "691eaa1c-e531-4537-a18f-96f7fced690c",
        "url": "/v2/apps/691eaa1c-e531-4537-a18f-96f7fced690c",
        "created_at": "2015-01-27T19:14:42Z",
        "updated_at": "2015-01-27T19:14:42Z"
      },
      "entity": {
        "name": "name-1860",
        "production": false,
        "space_guid": "9fc1ca55-fce8-4015-a49d-b0f47161ad6e",
        "stack_guid": "67d24855-40d2-41b5-8f64-07b08b505287",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "c93307c9-0699-4b86-9002-74dc732a1e3f",
        "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-27T19:14:42Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/9fc1ca55-fce8-4015-a49d-b0f47161ad6e",
        "stack_url": "/v2/stacks/67d24855-40d2-41b5-8f64-07b08b505287",
        "events_url": "/v2/apps/691eaa1c-e531-4537-a18f-96f7fced690c/events",
        "service_bindings_url": "/v2/apps/691eaa1c-e531-4537-a18f-96f7fced690c/service_bindings",
        "routes_url": "/v2/apps/691eaa1c-e531-4537-a18f-96f7fced690c/routes"
      }
    },
    {
      "metadata": {
        "guid": "780266a3-6e03-4c90-8697-c8ffa1b97812",
        "url": "/v2/apps/780266a3-6e03-4c90-8697-c8ffa1b97812",
        "created_at": "2015-01-27T19:14:42Z",
        "updated_at": "2015-01-27T19:14:42Z"
      },
      "entity": {
        "name": "name-1850",
        "production": false,
        "space_guid": "2f006450-3946-4e3a-b441-00a263189edf",
        "stack_guid": "9f010291-7086-41e8-b851-6cd7d8b264bd",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "eaf7e275-6f6b-4085-bc27-ba3d586994ce",
        "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-27T19:14:42Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/2f006450-3946-4e3a-b441-00a263189edf",
        "stack_url": "/v2/stacks/9f010291-7086-41e8-b851-6cd7d8b264bd",
        "events_url": "/v2/apps/780266a3-6e03-4c90-8697-c8ffa1b97812/events",
        "service_bindings_url": "/v2/apps/780266a3-6e03-4c90-8697-c8ffa1b97812/service_bindings",
        "routes_url": "/v2/apps/780266a3-6e03-4c90-8697-c8ffa1b97812/routes"
      }
    },
    {
      "metadata": {
        "guid": "d9ba38ea-0c82-404a-b5c4-244e599f6503",
        "url": "/v2/apps/d9ba38ea-0c82-404a-b5c4-244e599f6503",
        "created_at": "2015-01-27T19:14:42Z",
        "updated_at": "2015-01-27T19:14:42Z"
      },
      "entity": {
        "name": "name-1855",
        "production": false,
        "space_guid": "fbc86b93-49ab-4858-8136-9e20d0b1a6b8",
        "stack_guid": "72acbae3-cbc3-48f4-8697-ff9a5e0742e1",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "80d0b251-8bac-4705-88fa-209510178d0a",
        "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-27T19:14:42Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/fbc86b93-49ab-4858-8136-9e20d0b1a6b8",
        "stack_url": "/v2/stacks/72acbae3-cbc3-48f4-8697-ff9a5e0742e1",
        "events_url": "/v2/apps/d9ba38ea-0c82-404a-b5c4-244e599f6503/events",
        "service_bindings_url": "/v2/apps/d9ba38ea-0c82-404a-b5c4-244e599f6503/service_bindings",
        "routes_url": "/v2/apps/d9ba38ea-0c82-404a-b5c4-244e599f6503/routes"
      }
    }
  ]
}