Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

List all Apps

GET /v3/apps

Request

Route

GET /v3/apps?page=1&per_page=2&order_by=created_at&order_direction=desc

Parameters

Name Description Valid Values Example Values
names Names of apps to filter by
  • array of strings
  • names[]=name1&names[]=name2
space_guids Spaces to filter by
  • array of strings
  • space_guids[]=space_guid1&space_guids[]=space_guid2
organization_guids Organizations to filter by
  • array of strings
  • organization_guids[]=org_guid1&organization_guids[]=org_guid2
guids App guids to filter by
  • array of strings
  • guid[]=guid1&guid[]=guid2
page Page to display
  • >= 1
per_page Number of results per page
  • 1 - 5000
order_by Value to sort by
  • created_at, updated_at
order_direction Direction to sort by
  • asc, desc
page: 1
per_page: 2
order_by: created_at
order_direction: desc

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MSIsImVtYWlsIjoiZW1haWwtMTA1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTV9.37wsNr9h8Udq19vM7rxDRsCMhyPcQbhPbbGL4vIny5U
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?page=1&per_page=2&order_by=created_at&order_direction=desc" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MSIsImVtYWlsIjoiZW1haWwtMTA1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTV9.37wsNr9h8Udq19vM7rxDRsCMhyPcQbhPbbGL4vIny5U" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?order_by=created_at&order_direction=desc&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps?order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "next": {
      "href": "/v3/apps?order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-acfbae75-7d3a-45b1-b730-ca3cc4263045",
      "name": "my_app3",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": "name-383",
      "created_at": "1970-01-01T00:00:03Z",
      "updated_at": null,
      "environment_variables": {
        "magic": "beautiful"
      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-acfbae75-7d3a-45b1-b730-ca3cc4263045"
        },
        "processes": {
          "href": "/v3/apps/guid-acfbae75-7d3a-45b1-b730-ca3cc4263045/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-acfbae75-7d3a-45b1-b730-ca3cc4263045/packages"
        },
        "space": {
          "href": "/v2/spaces/a6a823be-49c0-4591-bfdc-5bf0998a9d62"
        },
        "start": {
          "href": "/v3/apps/guid-acfbae75-7d3a-45b1-b730-ca3cc4263045/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-acfbae75-7d3a-45b1-b730-ca3cc4263045/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-acfbae75-7d3a-45b1-b730-ca3cc4263045/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-f2e97073-86d2-473e-8d03-76742f16bf6e",
      "name": "my_app2",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": null,
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-f2e97073-86d2-473e-8d03-76742f16bf6e"
        },
        "processes": {
          "href": "/v3/apps/guid-f2e97073-86d2-473e-8d03-76742f16bf6e/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-f2e97073-86d2-473e-8d03-76742f16bf6e/packages"
        },
        "space": {
          "href": "/v2/spaces/a6a823be-49c0-4591-bfdc-5bf0998a9d62"
        },
        "start": {
          "href": "/v3/apps/guid-f2e97073-86d2-473e-8d03-76742f16bf6e/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-f2e97073-86d2-473e-8d03-76742f16bf6e/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-f2e97073-86d2-473e-8d03-76742f16bf6e/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 99df89b2-5c14-40ef-a810-42c43562621a
Content-Length: 2807
X-Content-Type-Options: nosniff