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-d21809ea-23f7-45b0-b366-d058436de7a1
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.eyJ1c2VyX2lkIjoidWFhLWlkLTI1MSIsImVtYWlsIjoiZW1haWwtMTgzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NTl9.2h1n0maFpRH5jOhooLgbrmdaY0xIFNoC-rLH93YUeRw
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1MSIsImVtYWlsIjoiZW1haWwtMTgzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NTl9.2h1n0maFpRH5jOhooLgbrmdaY0xIFNoC-rLH93YUeRw" \
	-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": "1c1aedea-abb0-436e-af78-9038a5562ebf",
        "url": "/v2/apps/1c1aedea-abb0-436e-af78-9038a5562ebf",
        "created_at": "2015-03-20T18:27:38Z",
        "updated_at": "2015-03-20T18:27:38Z"
      },
      "entity": {
        "name": "name-1518",
        "production": false,
        "space_guid": "7953d828-3733-482e-a47d-3161503182fa",
        "stack_guid": "fd362575-31fd-4f02-9344-3fd2fd44ea7a",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "ce57c1dd-b79c-451e-b92e-e87186173cc3",
        "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-03-20T18:27:39Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/7953d828-3733-482e-a47d-3161503182fa",
        "stack_url": "/v2/stacks/fd362575-31fd-4f02-9344-3fd2fd44ea7a",
        "events_url": "/v2/apps/1c1aedea-abb0-436e-af78-9038a5562ebf/events",
        "service_bindings_url": "/v2/apps/1c1aedea-abb0-436e-af78-9038a5562ebf/service_bindings",
        "routes_url": "/v2/apps/1c1aedea-abb0-436e-af78-9038a5562ebf/routes"
      }
    },
    {
      "metadata": {
        "guid": "b2840ffd-915b-41af-b2e6-8b82eae53911",
        "url": "/v2/apps/b2840ffd-915b-41af-b2e6-8b82eae53911",
        "created_at": "2015-03-20T18:27:38Z",
        "updated_at": "2015-03-20T18:27:38Z"
      },
      "entity": {
        "name": "name-1513",
        "production": false,
        "space_guid": "3738a67d-97f2-449a-9426-7d28da8e1171",
        "stack_guid": "9e554134-5190-4467-b312-ae441f50d529",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "0299006b-e7cf-42c9-a392-839961b21137",
        "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-03-20T18:27:38Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/3738a67d-97f2-449a-9426-7d28da8e1171",
        "stack_url": "/v2/stacks/9e554134-5190-4467-b312-ae441f50d529",
        "events_url": "/v2/apps/b2840ffd-915b-41af-b2e6-8b82eae53911/events",
        "service_bindings_url": "/v2/apps/b2840ffd-915b-41af-b2e6-8b82eae53911/service_bindings",
        "routes_url": "/v2/apps/b2840ffd-915b-41af-b2e6-8b82eae53911/routes"
      }
    },
    {
      "metadata": {
        "guid": "b6772b14-a3d6-4887-a896-f16b26c384ae",
        "url": "/v2/apps/b6772b14-a3d6-4887-a896-f16b26c384ae",
        "created_at": "2015-03-20T18:27:38Z",
        "updated_at": "2015-03-20T18:27:38Z"
      },
      "entity": {
        "name": "name-1523",
        "production": false,
        "space_guid": "59c01022-d48b-4b5d-b478-d02b6c7f246e",
        "stack_guid": "b769f91b-c866-4728-9725-c88b32e07e0b",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "e4220aff-a7ff-41ba-aad8-e386fccc6e9d",
        "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-03-20T18:27:39Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/59c01022-d48b-4b5d-b478-d02b6c7f246e",
        "stack_url": "/v2/stacks/b769f91b-c866-4728-9725-c88b32e07e0b",
        "events_url": "/v2/apps/b6772b14-a3d6-4887-a896-f16b26c384ae/events",
        "service_bindings_url": "/v2/apps/b6772b14-a3d6-4887-a896-f16b26c384ae/service_bindings",
        "routes_url": "/v2/apps/b6772b14-a3d6-4887-a896-f16b26c384ae/routes"
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: a69ebf64-0588-4575-8b54-7daf486d785f
Content-Length: 4668
X-Content-Type-Options: nosniff