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[]=2678b424-3240-4514-afa6-4fb12bf70768&space_guids[]=b5d9d762-a7d4-4722-b5a6-9b3271d7919f&space_guids[]=74213f01-cdad-4296-8363-59d04b77bfe6&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
names: ["my_app1"]
space_guids: ["2678b424-3240-4514-afa6-4fb12bf70768", "b5d9d762-a7d4-4722-b5a6-9b3271d7919f", "74213f01-cdad-4296-8363-59d04b77bfe6"]
page: 1
per_page: 2
order_by: created_at
order_direction: desc

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1OCIsImVtYWlsIjoiZW1haWwtMjQ4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMTJ9.DG_olEGVPXlaZNoXOTTZre-Gz_h4rV9S2H6aqsj5mpk
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps?names[]=my_app1&space_guids[]=2678b424-3240-4514-afa6-4fb12bf70768&space_guids[]=b5d9d762-a7d4-4722-b5a6-9b3271d7919f&space_guids[]=74213f01-cdad-4296-8363-59d04b77bfe6&page=1&per_page=2&order_by=created_at&order_direction=desc" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1OCIsImVtYWlsIjoiZW1haWwtMjQ4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMTJ9.DG_olEGVPXlaZNoXOTTZre-Gz_h4rV9S2H6aqsj5mpk" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=2678b424-3240-4514-afa6-4fb12bf70768&space_guids[]=b5d9d762-a7d4-4722-b5a6-9b3271d7919f&space_guids[]=74213f01-cdad-4296-8363-59d04b77bfe6&order_by=created_at&order_direction=desc&page=1&per_page=2"
    },
    "last": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=2678b424-3240-4514-afa6-4fb12bf70768&space_guids[]=b5d9d762-a7d4-4722-b5a6-9b3271d7919f&space_guids[]=74213f01-cdad-4296-8363-59d04b77bfe6&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "next": {
      "href": "/v3/apps?names[]=my_app1&space_guids[]=2678b424-3240-4514-afa6-4fb12bf70768&space_guids[]=b5d9d762-a7d4-4722-b5a6-9b3271d7919f&space_guids[]=74213f01-cdad-4296-8363-59d04b77bfe6&order_by=created_at&order_direction=desc&page=2&per_page=2"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-2f2e45c8-eaee-4033-b0ae-c805ad8269ce",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": null,
      "created_at": "2015-08-06T00:36:51Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-2f2e45c8-eaee-4033-b0ae-c805ad8269ce"
        },
        "space": {
          "href": "/v2/spaces/2678b424-3240-4514-afa6-4fb12bf70768"
        },
        "processes": {
          "href": "/v3/apps/guid-2f2e45c8-eaee-4033-b0ae-c805ad8269ce/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-2f2e45c8-eaee-4033-b0ae-c805ad8269ce/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-2f2e45c8-eaee-4033-b0ae-c805ad8269ce/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-2f2e45c8-eaee-4033-b0ae-c805ad8269ce/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-2f2e45c8-eaee-4033-b0ae-c805ad8269ce/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-2f2e45c8-eaee-4033-b0ae-c805ad8269ce/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-2f2e45c8-eaee-4033-b0ae-c805ad8269ce/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-b34c2948-de64-44e1-9000-a058d3f1944e",
      "name": "my_app1",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "buildpack": null,
      "created_at": "2015-08-06T00:36:51Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-b34c2948-de64-44e1-9000-a058d3f1944e"
        },
        "space": {
          "href": "/v2/spaces/74213f01-cdad-4296-8363-59d04b77bfe6"
        },
        "processes": {
          "href": "/v3/apps/guid-b34c2948-de64-44e1-9000-a058d3f1944e/processes"
        },
        "routes": {
          "href": "/v3/apps/guid-b34c2948-de64-44e1-9000-a058d3f1944e/routes"
        },
        "packages": {
          "href": "/v3/apps/guid-b34c2948-de64-44e1-9000-a058d3f1944e/packages"
        },
        "droplets": {
          "href": "/v3/apps/guid-b34c2948-de64-44e1-9000-a058d3f1944e/droplets"
        },
        "start": {
          "href": "/v3/apps/guid-b34c2948-de64-44e1-9000-a058d3f1944e/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-b34c2948-de64-44e1-9000-a058d3f1944e/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-b34c2948-de64-44e1-9000-a058d3f1944e/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3195f385-85c9-4683-8354-bd35b18a0953
Content-Length: 3724
X-Content-Type-Options: nosniff