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-77f158d6-67cb-4f95-be05-afa8f5b61fa4
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.eyJ1c2VyX2lkIjoidWFhLWlkLTI3OSIsImVtYWlsIjoiZW1haWwtMjEwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NTV9.Fb0N89igOEATrjxFnHs6HbhLbr1Xr88T_vFynwXUm_s
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3OSIsImVtYWlsIjoiZW1haWwtMjEwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NTV9.Fb0N89igOEATrjxFnHs6HbhLbr1Xr88T_vFynwXUm_s" \
	-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": "2de639ce-d1ba-4b5f-8e90-3ade56efb426",
        "url": "/v2/apps/2de639ce-d1ba-4b5f-8e90-3ade56efb426",
        "created_at": "2015-03-05T19:15:54Z",
        "updated_at": "2015-03-05T19:15:54Z"
      },
      "entity": {
        "name": "name-898",
        "production": false,
        "space_guid": "45af37af-ee76-4b5a-ac60-c8c1922b4e31",
        "stack_guid": "cb0d6270-4b76-4924-98fc-b11b19050807",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "5cc012f6-a321-47bb-8924-47072e8ced4a",
        "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-05T19:15:54Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/45af37af-ee76-4b5a-ac60-c8c1922b4e31",
        "stack_url": "/v2/stacks/cb0d6270-4b76-4924-98fc-b11b19050807",
        "events_url": "/v2/apps/2de639ce-d1ba-4b5f-8e90-3ade56efb426/events",
        "service_bindings_url": "/v2/apps/2de639ce-d1ba-4b5f-8e90-3ade56efb426/service_bindings",
        "routes_url": "/v2/apps/2de639ce-d1ba-4b5f-8e90-3ade56efb426/routes"
      }
    },
    {
      "metadata": {
        "guid": "70cade90-9365-4197-a0ae-633682bc986e",
        "url": "/v2/apps/70cade90-9365-4197-a0ae-633682bc986e",
        "created_at": "2015-03-05T19:15:54Z",
        "updated_at": "2015-03-05T19:15:54Z"
      },
      "entity": {
        "name": "name-908",
        "production": false,
        "space_guid": "72936203-5c96-4299-adc5-79049caf2950",
        "stack_guid": "c013d2cb-abe2-4feb-885e-3969c1b025e2",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "bb5cb14b-2151-4e23-bbbc-08dac596c2b5",
        "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-05T19:15:54Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/72936203-5c96-4299-adc5-79049caf2950",
        "stack_url": "/v2/stacks/c013d2cb-abe2-4feb-885e-3969c1b025e2",
        "events_url": "/v2/apps/70cade90-9365-4197-a0ae-633682bc986e/events",
        "service_bindings_url": "/v2/apps/70cade90-9365-4197-a0ae-633682bc986e/service_bindings",
        "routes_url": "/v2/apps/70cade90-9365-4197-a0ae-633682bc986e/routes"
      }
    },
    {
      "metadata": {
        "guid": "bd2a6378-ed7a-4128-97f0-adc5720cbd83",
        "url": "/v2/apps/bd2a6378-ed7a-4128-97f0-adc5720cbd83",
        "created_at": "2015-03-05T19:15:54Z",
        "updated_at": "2015-03-05T19:15:54Z"
      },
      "entity": {
        "name": "name-903",
        "production": false,
        "space_guid": "799671a7-379a-4e99-ad39-0e7481829202",
        "stack_guid": "548667ae-d7c3-4dd4-87a5-d96af7435c61",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "e7fee8b8-21b8-4b17-b72d-6f60771abd0f",
        "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-05T19:15:54Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/799671a7-379a-4e99-ad39-0e7481829202",
        "stack_url": "/v2/stacks/548667ae-d7c3-4dd4-87a5-d96af7435c61",
        "events_url": "/v2/apps/bd2a6378-ed7a-4128-97f0-adc5720cbd83/events",
        "service_bindings_url": "/v2/apps/bd2a6378-ed7a-4128-97f0-adc5720cbd83/service_bindings",
        "routes_url": "/v2/apps/bd2a6378-ed7a-4128-97f0-adc5720cbd83/routes"
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: e399d7f4-4a54-443a-8605-cbf221832790
Content-Length: 4665
X-Content-Type-Options: nosniff