Home
Version 3
Apps API

Apps API

List all Apps

GET /v2/apps

Request

Route

GET /v2/apps

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, diego
  • 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

Body

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-cbf7a131-1740-4f48-9054-0cd4bfcf83d6
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, maximum length: 4096 (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
diego Use diego to stage and to run when available false
  • true
  • false
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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0MSIsImVtYWlsIjoiZW1haWwtMjQzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjkwMzg3MTd9.KBn_tRYe5GMp-2fvPFphfSwxNE2rCTR9DRPMIwtUIoc
Host: example.org
Cookie: 

cURL

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

Response

Status

200 OK

Body

{
  "total_results": 3,
  "total_pages": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [
    {
      "metadata": {
        "guid": "79ad1515-3738-4c2a-8e1b-d60d13694486",
        "url": "/v2/apps/79ad1515-3738-4c2a-8e1b-d60d13694486",
        "created_at": "2015-04-07T19:11:57Z",
        "updated_at": "2015-04-07T19:11:57Z"
      },
      "entity": {
        "name": "name-1788",
        "production": false,
        "space_guid": "49e0f665-8dc4-4c9c-9b6a-a63c5fba41c9",
        "stack_guid": "f68d5c26-8198-4bd8-8e71-f1a87cbb0f22",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "2c1d6ec5-46ba-4253-a962-00e92e8c3036",
        "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,
        "diego": false,
        "docker_image": null,
        "package_updated_at": "2015-04-07T19:11:57Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/49e0f665-8dc4-4c9c-9b6a-a63c5fba41c9",
        "stack_url": "/v2/stacks/f68d5c26-8198-4bd8-8e71-f1a87cbb0f22",
        "events_url": "/v2/apps/79ad1515-3738-4c2a-8e1b-d60d13694486/events",
        "service_bindings_url": "/v2/apps/79ad1515-3738-4c2a-8e1b-d60d13694486/service_bindings",
        "routes_url": "/v2/apps/79ad1515-3738-4c2a-8e1b-d60d13694486/routes"
      }
    },
    {
      "metadata": {
        "guid": "cdd96262-5c55-44fe-9f17-88f5d97ccbbe",
        "url": "/v2/apps/cdd96262-5c55-44fe-9f17-88f5d97ccbbe",
        "created_at": "2015-04-07T19:11:57Z",
        "updated_at": "2015-04-07T19:11:57Z"
      },
      "entity": {
        "name": "name-1783",
        "production": false,
        "space_guid": "149e3975-88de-4b82-aca6-700a81dfb2ad",
        "stack_guid": "0047edeb-7d2f-4182-adce-5afff5a3f639",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "e230f8c4-cdc0-4e2c-a8ab-46190c68b799",
        "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,
        "diego": false,
        "docker_image": null,
        "package_updated_at": "2015-04-07T19:11:57Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/149e3975-88de-4b82-aca6-700a81dfb2ad",
        "stack_url": "/v2/stacks/0047edeb-7d2f-4182-adce-5afff5a3f639",
        "events_url": "/v2/apps/cdd96262-5c55-44fe-9f17-88f5d97ccbbe/events",
        "service_bindings_url": "/v2/apps/cdd96262-5c55-44fe-9f17-88f5d97ccbbe/service_bindings",
        "routes_url": "/v2/apps/cdd96262-5c55-44fe-9f17-88f5d97ccbbe/routes"
      }
    },
    {
      "metadata": {
        "guid": "e5dc41d4-e728-4d1f-9c1c-41bc1fc62fbb",
        "url": "/v2/apps/e5dc41d4-e728-4d1f-9c1c-41bc1fc62fbb",
        "created_at": "2015-04-07T19:11:57Z",
        "updated_at": "2015-04-07T19:11:57Z"
      },
      "entity": {
        "name": "name-1793",
        "production": false,
        "space_guid": "7ee107d7-4163-4373-b5c1-12ca11981d5b",
        "stack_guid": "63ae0fcb-3b6c-47aa-8362-8c658c85efc3",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "21146ee9-66e6-4903-8982-19a3efb0986a",
        "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,
        "diego": false,
        "docker_image": null,
        "package_updated_at": "2015-04-07T19:11:57Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/7ee107d7-4163-4373-b5c1-12ca11981d5b",
        "stack_url": "/v2/stacks/63ae0fcb-3b6c-47aa-8362-8c658c85efc3",
        "events_url": "/v2/apps/e5dc41d4-e728-4d1f-9c1c-41bc1fc62fbb/events",
        "service_bindings_url": "/v2/apps/e5dc41d4-e728-4d1f-9c1c-41bc1fc62fbb/service_bindings",
        "routes_url": "/v2/apps/e5dc41d4-e728-4d1f-9c1c-41bc1fc62fbb/routes"
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 4008cb3c-2b66-490c-a3e7-051d10345a3c
Content-Length: 4668
X-Content-Type-Options: nosniff