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, stack_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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0MyIsImVtYWlsIjoiZW1haWwtMzA1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDV9.aDT-ydnSwmSIdukBXVx9CB9ktBfnAHh9t2JKsudB8-0
Host: example.org
Cookie: 

cURL

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

Response

Status

200 OK

Body

Name Description 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-a7130f7d-23ae-41db-97ae-f6f4bbf99a11
stack_guid The guid of the associated stack.
  • guid-3b1c8f42-9e13-46e6-a7a1-1f606c090c39
state The current desired state of the app. One of STOPPED or STARTED.
  • STOPPED
  • STARTED
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
detected_buildpack Buildpack that has been found for the app through autodetection
  • ruby 1.6.20
detected_buildpack_guid Guid of the detected_buildpack
  • d12fdf1a-f061-4040-81f4-b5b5b55570bd
health_check_http_endpoint Endpoint called to determine if the app is healthy.
  • /health
health_check_type Type of health check to perform. 'none' is deprecated and an alias to 'process'.
  • http
  • port
  • process
  • none
health_check_timeout Timeout in seconds for health checking of an staged app when starting up
diego Use diego to stage and to run when available
  • true
  • false
enable_ssh Enable SSHing into the app. Supported for Diego only.
  • true
  • false
detected_start_command The command detected by the buildpack during staging.
  • rails s
docker_image Name of the Docker image containing the app. The "diego_docker" feature flag must be enabled in order to create Docker image apps.
  • cloudfoundry/diego-docker-app
  • registry.example.com:5000/user/repository/tag
docker_credentials Docker credentials for pulling docker image.
  • {"username": "user", "password": "***"}
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
  • false
console Open the console port for the app (at $CONSOLE_PORT).
  • true
  • false
debug Open the debug port for the app (at $DEBUG_PORT).
  • true
  • false
staging_failed_reason Reason for application staging failures
  • StagingError
  • StagingTimeExpired
staging_failed_description Detailed description for the staging_failed_reason
  • An app was not successfully detected by any available buildpack
ports Ports on which application may listen. Overwrites previously configured ports. Ports must be in range 1024-65535. Supported for Diego only.
  • [5222, 8080]
  • [1056]
{
  "total_results": 3,
  "total_pages": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [
    {
      "metadata": {
        "guid": "6064d98a-95e6-400b-bc03-be65e6d59622",
        "url": "/v2/apps/6064d98a-95e6-400b-bc03-be65e6d59622",
        "created_at": "2016-06-08T16:41:45Z",
        "updated_at": "2016-06-08T16:41:45Z"
      },
      "entity": {
        "name": "name-2443",
        "production": false,
        "space_guid": "9c5c8a91-a728-4608-9f5e-6c8026c3a2ac",
        "stack_guid": "f6c960cc-98ba-4fd1-b197-ecbf39108aa2",
        "buildpack": null,
        "detected_buildpack": null,
        "detected_buildpack_guid": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "f5696e0f-087d-49b0-9ad7-4756c49a6ba6",
        "command": null,
        "console": false,
        "debug": null,
        "staging_task_id": null,
        "package_state": "PENDING",
        "health_check_http_endpoint": "",
        "health_check_type": "port",
        "health_check_timeout": null,
        "staging_failed_reason": null,
        "staging_failed_description": null,
        "diego": false,
        "docker_image": null,
        "docker_credentials": {
          "username": null,
          "password": null
        },
        "package_updated_at": "2016-06-08T16:41:45Z",
        "detected_start_command": "",
        "enable_ssh": true,
        "ports": null,
        "space_url": "/v2/spaces/9c5c8a91-a728-4608-9f5e-6c8026c3a2ac",
        "stack_url": "/v2/stacks/f6c960cc-98ba-4fd1-b197-ecbf39108aa2",
        "routes_url": "/v2/apps/6064d98a-95e6-400b-bc03-be65e6d59622/routes",
        "events_url": "/v2/apps/6064d98a-95e6-400b-bc03-be65e6d59622/events",
        "service_bindings_url": "/v2/apps/6064d98a-95e6-400b-bc03-be65e6d59622/service_bindings",
        "route_mappings_url": "/v2/apps/6064d98a-95e6-400b-bc03-be65e6d59622/route_mappings"
      }
    },
    {
      "metadata": {
        "guid": "69ebed50-222a-4880-b163-fb1bf7d60b0c",
        "url": "/v2/apps/69ebed50-222a-4880-b163-fb1bf7d60b0c",
        "created_at": "2016-06-08T16:41:45Z",
        "updated_at": "2016-06-08T16:41:45Z"
      },
      "entity": {
        "name": "name-2437",
        "production": false,
        "space_guid": "5a98cff5-d97b-4828-9bfe-8d3f9fc80d3a",
        "stack_guid": "5dc6e2cc-9f50-4c8f-9a11-1a7f821e3d09",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "cf98a13f-4001-4595-ba34-a9a7f32b2fb2",
        "command": null,
        "console": false,
        "debug": null,
        "staging_task_id": null,
        "package_state": "PENDING",
        "health_check_http_endpoint": "",
        "health_check_type": "port",
        "health_check_timeout": null,
        "staging_failed_reason": null,
        "staging_failed_description": null,
        "diego": false,
        "docker_image": null,
        "docker_credentials": {
          "username": null,
          "password": null
        },
        "package_updated_at": "2016-06-08T16:41:45Z",
        "detected_start_command": "",
        "enable_ssh": true,
        "ports": null,
        "space_url": "/v2/spaces/5a98cff5-d97b-4828-9bfe-8d3f9fc80d3a",
        "stack_url": "/v2/stacks/5dc6e2cc-9f50-4c8f-9a11-1a7f821e3d09",
        "routes_url": "/v2/apps/69ebed50-222a-4880-b163-fb1bf7d60b0c/routes",
        "events_url": "/v2/apps/69ebed50-222a-4880-b163-fb1bf7d60b0c/events",
        "service_bindings_url": "/v2/apps/69ebed50-222a-4880-b163-fb1bf7d60b0c/service_bindings",
        "route_mappings_url": "/v2/apps/69ebed50-222a-4880-b163-fb1bf7d60b0c/route_mappings"
      }
    },
    {
      "metadata": {
        "guid": "d7133689-3df2-4907-b335-3621cbb21507",
        "url": "/v2/apps/d7133689-3df2-4907-b335-3621cbb21507",
        "created_at": "2016-06-08T16:41:45Z",
        "updated_at": "2016-06-08T16:41:45Z"
      },
      "entity": {
        "name": "name-2431",
        "production": false,
        "space_guid": "004c5060-b2df-48bc-8388-1f129be2e232",
        "stack_guid": "3e462631-6d79-4f1a-8538-c8f1c7b50fc9",
        "buildpack": null,
        "detected_buildpack": null,
        "detected_buildpack_guid": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "120d2490-f8c6-4e7d-86ed-be6f54ed6eb3",
        "command": null,
        "console": false,
        "debug": null,
        "staging_task_id": null,
        "package_state": "PENDING",
        "health_check_http_endpoint": "",
        "health_check_type": "port",
        "health_check_timeout": null,
        "staging_failed_reason": null,
        "staging_failed_description": null,
        "diego": false,
        "docker_image": null,
        "docker_credentials": {
          "username": null,
          "password": null
        },
        "package_updated_at": "2016-06-08T16:41:45Z",
        "detected_start_command": "",
        "enable_ssh": true,
        "ports": null,
        "space_url": "/v2/spaces/004c5060-b2df-48bc-8388-1f129be2e232",
        "stack_url": "/v2/stacks/3e462631-6d79-4f1a-8538-c8f1c7b50fc9",
        "routes_url": "/v2/apps/d7133689-3df2-4907-b335-3621cbb21507/routes",
        "events_url": "/v2/apps/d7133689-3df2-4907-b335-3621cbb21507/events",
        "service_bindings_url": "/v2/apps/d7133689-3df2-4907-b335-3621cbb21507/service_bindings",
        "route_mappings_url": "/v2/apps/d7133689-3df2-4907-b335-3621cbb21507/route_mappings"
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: dd5a71fd-4b2b-449f-90aa-75380eb13b7e
Content-Length: 5541
X-Content-Type-Options: nosniff