Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

Filters Apps by guids, names, spaces, and organizations

GET /v3/apps

Request

Route

GET /v3/apps?names=my_app1&space_guids=717fb90a-2150-456a-932e-59b054d36c44%2C3d559aed-72c1-4ded-9bd9-be3efe61f7ca%2C0df1575c-3180-4b7a-9b24-a64d0a28eaf0&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
names: my_app1
space_guids: 717fb90a-2150-456a-932e-59b054d36c44,3d559aed-72c1-4ded-9bd9-be3efe61f7ca,0df1575c-3180-4b7a-9b24-a64d0a28eaf0
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExNiIsImVtYWlsIjoiZW1haWwtODJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0OTUzMTUxNn0.L06VR74CXoXkn8X_Ja4bFJfeNgJFv8ooGLXLO0Pn2JQ
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names=my_app1&space_guids=717fb90a-2150-456a-932e-59b054d36c44%2C3d559aed-72c1-4ded-9bd9-be3efe61f7ca%2C0df1575c-3180-4b7a-9b24-a64d0a28eaf0&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExNiIsImVtYWlsIjoiZW1haWwtODJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0OTUzMTUxNn0.L06VR74CXoXkn8X_Ja4bFJfeNgJFv8ooGLXLO0Pn2JQ" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=1&per_page=2&space_guids=717fb90a-2150-456a-932e-59b054d36c44%2C3d559aed-72c1-4ded-9bd9-be3efe61f7ca%2C0df1575c-3180-4b7a-9b24-a64d0a28eaf0"
    },
    "last": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=717fb90a-2150-456a-932e-59b054d36c44%2C3d559aed-72c1-4ded-9bd9-be3efe61f7ca%2C0df1575c-3180-4b7a-9b24-a64d0a28eaf0"
    },
    "next": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=717fb90a-2150-456a-932e-59b054d36c44%2C3d559aed-72c1-4ded-9bd9-be3efe61f7ca%2C0df1575c-3180-4b7a-9b24-a64d0a28eaf0"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-2e202b81-950f-4526-ba18-e862f5ce3bac",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2015-11-30T23:38:36Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-581",
          "stack": "name-582"
        }
      },
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-2e202b81-950f-4526-ba18-e862f5ce3bac"
        },
        "space": {
          "href": "/v2/spaces/717fb90a-2150-456a-932e-59b054d36c44"
        },
        "processes": {
          "href": "/v3/apps/guid-2e202b81-950f-4526-ba18-e862f5ce3bac/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-2e202b81-950f-4526-ba18-e862f5ce3bac/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-2e202b81-950f-4526-ba18-e862f5ce3bac/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-2e202b81-950f-4526-ba18-e862f5ce3bac/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-2e202b81-950f-4526-ba18-e862f5ce3bac/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-2e202b81-950f-4526-ba18-e862f5ce3bac/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-2e202b81-950f-4526-ba18-e862f5ce3bac/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-5ca97bc8-4571-4a5d-a843-031f21f21b07",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2015-11-30T23:38:36Z",
      "updated_at": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpack": "name-583",
          "stack": "name-584"
        }
      },
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-5ca97bc8-4571-4a5d-a843-031f21f21b07"
        },
        "space": {
          "href": "/v2/spaces/0df1575c-3180-4b7a-9b24-a64d0a28eaf0"
        },
        "processes": {
          "href": "/v3/apps/guid-5ca97bc8-4571-4a5d-a843-031f21f21b07/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-5ca97bc8-4571-4a5d-a843-031f21f21b07/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-5ca97bc8-4571-4a5d-a843-031f21f21b07/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-5ca97bc8-4571-4a5d-a843-031f21f21b07/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-5ca97bc8-4571-4a5d-a843-031f21f21b07/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-5ca97bc8-4571-4a5d-a843-031f21f21b07/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-5ca97bc8-4571-4a5d-a843-031f21f21b07/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.018921
Content-Length: 3832