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-46908193-a23a-402d-80ad-6cc3a82cd933
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.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MiIsImVtYWlsIjoiZW1haWwtMjEzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjY2MzM5MTR9._Y1FCZ0YetX1o2USAt7RLNGYYmAXKmvD-xWikRyuYgQ
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MiIsImVtYWlsIjoiZW1haWwtMjEzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjY2MzM5MTR9._Y1FCZ0YetX1o2USAt7RLNGYYmAXKmvD-xWikRyuYgQ" \
	-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": "61b0aaaf-b244-4df4-9077-0b316cb27c8c",
        "url": "/v2/apps/61b0aaaf-b244-4df4-9077-0b316cb27c8c",
        "created_at": "2015-03-10T23:11:54Z",
        "updated_at": "2015-03-10T23:11:54Z"
      },
      "entity": {
        "name": "name-1038",
        "production": false,
        "space_guid": "2e52287d-5461-4c9d-9ae5-aeb487f3fae1",
        "stack_guid": "2f89881d-6525-4d39-a6da-64a6a6acf67c",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "41f1ecf4-3c2d-4c9c-8fdb-569f90d01e9a",
        "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-10T23:11:54Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/2e52287d-5461-4c9d-9ae5-aeb487f3fae1",
        "stack_url": "/v2/stacks/2f89881d-6525-4d39-a6da-64a6a6acf67c",
        "events_url": "/v2/apps/61b0aaaf-b244-4df4-9077-0b316cb27c8c/events",
        "service_bindings_url": "/v2/apps/61b0aaaf-b244-4df4-9077-0b316cb27c8c/service_bindings",
        "routes_url": "/v2/apps/61b0aaaf-b244-4df4-9077-0b316cb27c8c/routes"
      }
    },
    {
      "metadata": {
        "guid": "9651ffa0-7c8e-45fc-9f51-53144dcbc631",
        "url": "/v2/apps/9651ffa0-7c8e-45fc-9f51-53144dcbc631",
        "created_at": "2015-03-10T23:11:54Z",
        "updated_at": "2015-03-10T23:11:54Z"
      },
      "entity": {
        "name": "name-1048",
        "production": false,
        "space_guid": "62111142-d365-4102-a783-4ebf3ef210cb",
        "stack_guid": "47c210b7-7030-4635-b2b4-c172e238cd49",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "0ad83c95-6e2a-4ec1-b3c4-9a39f2deaa94",
        "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-10T23:11:54Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/62111142-d365-4102-a783-4ebf3ef210cb",
        "stack_url": "/v2/stacks/47c210b7-7030-4635-b2b4-c172e238cd49",
        "events_url": "/v2/apps/9651ffa0-7c8e-45fc-9f51-53144dcbc631/events",
        "service_bindings_url": "/v2/apps/9651ffa0-7c8e-45fc-9f51-53144dcbc631/service_bindings",
        "routes_url": "/v2/apps/9651ffa0-7c8e-45fc-9f51-53144dcbc631/routes"
      }
    },
    {
      "metadata": {
        "guid": "b83c8770-6e20-4add-9d0e-642dc5fba60e",
        "url": "/v2/apps/b83c8770-6e20-4add-9d0e-642dc5fba60e",
        "created_at": "2015-03-10T23:11:54Z",
        "updated_at": "2015-03-10T23:11:54Z"
      },
      "entity": {
        "name": "name-1043",
        "production": false,
        "space_guid": "e0f28014-5a71-4e22-842d-31318f88e0f2",
        "stack_guid": "dcb91e14-e2e0-4887-b2a0-86b5eddb6551",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "d1994e46-7fb7-4963-99d1-8b425433623f",
        "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-10T23:11:54Z",
        "detected_start_command": "",
        "space_url": "/v2/spaces/e0f28014-5a71-4e22-842d-31318f88e0f2",
        "stack_url": "/v2/stacks/dcb91e14-e2e0-4887-b2a0-86b5eddb6551",
        "events_url": "/v2/apps/b83c8770-6e20-4add-9d0e-642dc5fba60e/events",
        "service_bindings_url": "/v2/apps/b83c8770-6e20-4add-9d0e-642dc5fba60e/service_bindings",
        "routes_url": "/v2/apps/b83c8770-6e20-4add-9d0e-642dc5fba60e/routes"
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c95d0527-e29c-4627-8a82-b076c1acb0a8
Content-Length: 4668
X-Content-Type-Options: nosniff