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

Parameters

Name Description Valid Values Example Values
names Names of apps to filter by
  • array of strings
  • names=name1,name2
space_guids Spaces to filter by
  • array of strings
  • space_guids=space_guid1,space_guid2
organization_guids Organizations to filter by
  • array of strings
  • organization_guids=org_guid1,org_guid2
guids App guids to filter by
  • array of strings
  • guid=guid1,guid2
page Page to display
  • >= 1
per_page Number of results per page
  • 1 - 5000
order_by Value to sort by. Prepend with "+" or "-" to change sort direction to ascending or descending, respectively.
  • created_at, updated_at
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMiLCJlbWFpbCI6ImVtYWlsLTNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1NjQ1MjIxOX0.MPh4EA3gYjdq10y6BztbdiuZg0diRizCVUzXc_JTjwE
Host: example.org
Cookie: 

cURL

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

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?order_by=-created_at&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps?order_by=-created_at&page=2&per_page=2"
    },
    "next": {
      "href": "/v3/apps?order_by=-created_at&page=2&per_page=2"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-761878e6-cbe9-4fc9-b033-ccca3803c37c",
      "name": "my_app3",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "1970-01-01T00:00:03Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-24",
          "stack": "name-25"
        }
      },
      "environment_variables": {
        "magic": "beautiful"
      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-761878e6-cbe9-4fc9-b033-ccca3803c37c"
        },
        "space": {
          "href": "/v2/spaces/ed0f21cf-76c7-4477-a5a3-c61c631a0ea2"
        },
        "processes": {
          "href": "/v3/apps/guid-761878e6-cbe9-4fc9-b033-ccca3803c37c/processes"
        },
        "route_mappings": {
          "href": "/v3/apps/guid-761878e6-cbe9-4fc9-b033-ccca3803c37c/route_mappings"
        },
        "packages": {
          "href": "/v3/apps/guid-761878e6-cbe9-4fc9-b033-ccca3803c37c/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-761878e6-cbe9-4fc9-b033-ccca3803c37c/droplets"
        },
        "tasks": {
          "href": "/v3/apps/guid-761878e6-cbe9-4fc9-b033-ccca3803c37c/tasks"
        },
        "start": {
          "href": "/v3/apps/guid-761878e6-cbe9-4fc9-b033-ccca3803c37c/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-761878e6-cbe9-4fc9-b033-ccca3803c37c/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-761878e6-cbe9-4fc9-b033-ccca3803c37c/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-b15be823-bdd2-4012-998b-10b51df6f40e",
      "name": "my_app2",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-22",
          "stack": "name-23"
        }
      },
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-b15be823-bdd2-4012-998b-10b51df6f40e"
        },
        "space": {
          "href": "/v2/spaces/ed0f21cf-76c7-4477-a5a3-c61c631a0ea2"
        },
        "processes": {
          "href": "/v3/apps/guid-b15be823-bdd2-4012-998b-10b51df6f40e/processes"
        },
        "route_mappings": {
          "href": "/v3/apps/guid-b15be823-bdd2-4012-998b-10b51df6f40e/route_mappings"
        },
        "packages": {
          "href": "/v3/apps/guid-b15be823-bdd2-4012-998b-10b51df6f40e/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-b15be823-bdd2-4012-998b-10b51df6f40e/droplets"
        },
        "tasks": {
          "href": "/v3/apps/guid-b15be823-bdd2-4012-998b-10b51df6f40e/tasks"
        },
        "start": {
          "href": "/v3/apps/guid-b15be823-bdd2-4012-998b-10b51df6f40e/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-b15be823-bdd2-4012-998b-10b51df6f40e/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-b15be823-bdd2-4012-998b-10b51df6f40e/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
X-Runtime: 0.019619
Content-Length: 3679