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

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-2d3e76b1-599d-42c5-949f-d113f71fde61
stack_guid The guid of the associated stack. Uses the default system stack.
  • guid-c62a2c2b-d013-46ca-a616-883dc3898af6
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
docker_credentials_json Docker credentials for pulling docker image. {}
  • #<RspecApiDocumentation::Views::HtmlExample:0x0000000abb1c78>
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
staging_failed_reason Reason for application staging failures
staging_failed_description Detailed description for the staging_failed_reason
ports Ports on which application may listen. Supported for applications pushed to Diego only.

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3IiwiZW1haWwiOiJlbWFpbC0yNkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ3MTE2ODI3fQ.12q_fLAYPuwQRClfpahCGeC091RBbJsUFBdQ283J6do
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3IiwiZW1haWwiOiJlbWFpbC0yNkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ3MTE2ODI3fQ.12q_fLAYPuwQRClfpahCGeC091RBbJsUFBdQ283J6do" \
	-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": "4ee49eee-ba2d-4d7a-9446-d2755999ca37",
        "url": "/v2/apps/4ee49eee-ba2d-4d7a-9446-d2755999ca37",
        "created_at": "2015-11-03T00:53:47Z",
        "updated_at": "2015-11-03T00:53:47Z"
      },
      "entity": {
        "name": "name-240",
        "production": false,
        "space_guid": "45ae5ab1-c6e8-4677-ba88-3b1278f93838",
        "stack_guid": "fed36551-d287-4f9c-af34-fef443916feb",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "d7698f03-5bb3-4728-9ab2-1215759d7285",
        "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,
        "staging_failed_description": null,
        "diego": false,
        "docker_image": null,
        "package_updated_at": "2015-11-03T00:53:47Z",
        "detected_start_command": "",
        "enable_ssh": true,
        "docker_credentials_json": {
          "redacted_message": "[PRIVATE DATA HIDDEN]"
        },
        "ports": null,
        "space_url": "/v2/spaces/45ae5ab1-c6e8-4677-ba88-3b1278f93838",
        "stack_url": "/v2/stacks/fed36551-d287-4f9c-af34-fef443916feb",
        "events_url": "/v2/apps/4ee49eee-ba2d-4d7a-9446-d2755999ca37/events",
        "service_bindings_url": "/v2/apps/4ee49eee-ba2d-4d7a-9446-d2755999ca37/service_bindings",
        "routes_url": "/v2/apps/4ee49eee-ba2d-4d7a-9446-d2755999ca37/routes"
      }
    },
    {
      "metadata": {
        "guid": "bead8790-3bf3-4958-8079-c0989aa734ff",
        "url": "/v2/apps/bead8790-3bf3-4958-8079-c0989aa734ff",
        "created_at": "2015-11-03T00:53:47Z",
        "updated_at": "2015-11-03T00:53:47Z"
      },
      "entity": {
        "name": "name-245",
        "production": false,
        "space_guid": "a76c67c6-ee9c-4c0d-ba3a-b6e7d1fc37e0",
        "stack_guid": "70272d84-ec06-432c-bffa-c61613c23a62",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "f0db5104-1695-4484-a649-93874e555aa5",
        "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,
        "staging_failed_description": null,
        "diego": false,
        "docker_image": null,
        "package_updated_at": "2015-11-03T00:53:47Z",
        "detected_start_command": "",
        "enable_ssh": true,
        "docker_credentials_json": {
          "redacted_message": "[PRIVATE DATA HIDDEN]"
        },
        "ports": null,
        "space_url": "/v2/spaces/a76c67c6-ee9c-4c0d-ba3a-b6e7d1fc37e0",
        "stack_url": "/v2/stacks/70272d84-ec06-432c-bffa-c61613c23a62",
        "events_url": "/v2/apps/bead8790-3bf3-4958-8079-c0989aa734ff/events",
        "service_bindings_url": "/v2/apps/bead8790-3bf3-4958-8079-c0989aa734ff/service_bindings",
        "routes_url": "/v2/apps/bead8790-3bf3-4958-8079-c0989aa734ff/routes"
      }
    },
    {
      "metadata": {
        "guid": "de0b85fe-fada-4030-9d27-7311d6305c73",
        "url": "/v2/apps/de0b85fe-fada-4030-9d27-7311d6305c73",
        "created_at": "2015-11-03T00:53:47Z",
        "updated_at": "2015-11-03T00:53:47Z"
      },
      "entity": {
        "name": "name-235",
        "production": false,
        "space_guid": "48b3e12f-f982-423d-95d6-f133703b5b62",
        "stack_guid": "b98ce0d8-dd5c-4cbc-9728-579658262127",
        "buildpack": null,
        "detected_buildpack": null,
        "environment_json": null,
        "memory": 1024,
        "instances": 1,
        "disk_quota": 1024,
        "state": "STOPPED",
        "version": "25eae002-ff13-47b3-89cc-cfbadf03e695",
        "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,
        "staging_failed_description": null,
        "diego": false,
        "docker_image": null,
        "package_updated_at": "2015-11-03T00:53:47Z",
        "detected_start_command": "",
        "enable_ssh": true,
        "docker_credentials_json": {
          "redacted_message": "[PRIVATE DATA HIDDEN]"
        },
        "ports": null,
        "space_url": "/v2/spaces/48b3e12f-f982-423d-95d6-f133703b5b62",
        "stack_url": "/v2/stacks/b98ce0d8-dd5c-4cbc-9728-579658262127",
        "events_url": "/v2/apps/de0b85fe-fada-4030-9d27-7311d6305c73/events",
        "service_bindings_url": "/v2/apps/de0b85fe-fada-4030-9d27-7311d6305c73/service_bindings",
        "routes_url": "/v2/apps/de0b85fe-fada-4030-9d27-7311d6305c73/routes"
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 1faac964-aacd-41db-bf8f-6817e85adf3c
Content-Length: 5256
X-Content-Type-Options: nosniff