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=8134d5fc-0b71-4b54-800c-23be50ecd54b%2C2e246937-0786-45d0-b005-1f35fdd1e849%2C42b1d6b3-a1ed-4fb9-89d9-7d8b6f33e47d&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: 8134d5fc-0b71-4b54-800c-23be50ecd54b,2e246937-0786-45d0-b005-1f35fdd1e849,42b1d6b3-a1ed-4fb9-89d9-7d8b6f33e47d
page: 1
per_page: 2
order_by: -created_at

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2OSIsImVtYWlsIjoiZW1haWwtMTcyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NTR9.jDx_jbC-zZa6wpA3ROV-Z7gKetr7B-FDgxpCv9jeomI
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names=my_app1&space_guids=8134d5fc-0b71-4b54-800c-23be50ecd54b%2C2e246937-0786-45d0-b005-1f35fdd1e849%2C42b1d6b3-a1ed-4fb9-89d9-7d8b6f33e47d&page=1&per_page=2&order_by=-created_at" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2OSIsImVtYWlsIjoiZW1haWwtMTcyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NTR9.jDx_jbC-zZa6wpA3ROV-Z7gKetr7B-FDgxpCv9jeomI" \
	-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=8134d5fc-0b71-4b54-800c-23be50ecd54b%2C2e246937-0786-45d0-b005-1f35fdd1e849%2C42b1d6b3-a1ed-4fb9-89d9-7d8b6f33e47d"
    },
    "last": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=8134d5fc-0b71-4b54-800c-23be50ecd54b%2C2e246937-0786-45d0-b005-1f35fdd1e849%2C42b1d6b3-a1ed-4fb9-89d9-7d8b6f33e47d"
    },
    "next": {
      "href": "/v3/apps?names=my_app1&order_by=-created_at&page=2&per_page=2&space_guids=8134d5fc-0b71-4b54-800c-23be50ecd54b%2C2e246937-0786-45d0-b005-1f35fdd1e849%2C42b1d6b3-a1ed-4fb9-89d9-7d8b6f33e47d"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-9180d374-4cad-4cda-8b07-8d2750aa2b29",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2015-10-15T23:52:34Z",
      "updated_at": null,
      "lifecycle": null,
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-9180d374-4cad-4cda-8b07-8d2750aa2b29"
        },
        "space": {
          "href": "/v2/spaces/8134d5fc-0b71-4b54-800c-23be50ecd54b"
        },
        "processes": {
          "href": "/v3/apps/guid-9180d374-4cad-4cda-8b07-8d2750aa2b29/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-9180d374-4cad-4cda-8b07-8d2750aa2b29/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-9180d374-4cad-4cda-8b07-8d2750aa2b29/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-9180d374-4cad-4cda-8b07-8d2750aa2b29/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-9180d374-4cad-4cda-8b07-8d2750aa2b29/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-9180d374-4cad-4cda-8b07-8d2750aa2b29/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-9180d374-4cad-4cda-8b07-8d2750aa2b29/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-97b1e4d6-a38e-4850-9123-2d11c22bfc9f",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "2015-10-15T23:52:34Z",
      "updated_at": null,
      "lifecycle": null,
      "environment_variables": {

      },
      "links": {
        "self": {
          "href": "/v3/apps/guid-97b1e4d6-a38e-4850-9123-2d11c22bfc9f"
        },
        "space": {
          "href": "/v2/spaces/42b1d6b3-a1ed-4fb9-89d9-7d8b6f33e47d"
        },
        "processes": {
          "href": "/v3/apps/guid-97b1e4d6-a38e-4850-9123-2d11c22bfc9f/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-97b1e4d6-a38e-4850-9123-2d11c22bfc9f/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-97b1e4d6-a38e-4850-9123-2d11c22bfc9f/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-97b1e4d6-a38e-4850-9123-2d11c22bfc9f/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-97b1e4d6-a38e-4850-9123-2d11c22bfc9f/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-97b1e4d6-a38e-4850-9123-2d11c22bfc9f/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-97b1e4d6-a38e-4850-9123-2d11c22bfc9f/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3e44d127-df57-401e-9053-0e2461727a01
Content-Length: 3578
X-Content-Type-Options: nosniff