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

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NCIsImVtYWlsIjoiZW1haWwtMTYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMTF9.Isf-J7mVSho0tVIDOHqXLPDYyNMOGHA6L7v2qjz4y78
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.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NCIsImVtYWlsIjoiZW1haWwtMTYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMTF9.Isf-J7mVSho0tVIDOHqXLPDYyNMOGHA6L7v2qjz4y78" \
	-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-6796e423-6d4e-4711-a06b-e316ed7bd94e",
      "name": "my_app3",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "1970-01-01T00:00:03Z",
      "updated_at": null,
      "environment_variables": {
        "magic": "beautiful"
      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-6796e423-6d4e-4711-a06b-e316ed7bd94e"
        },
        "processes": {
          "href": "/v3/apps/guid-6796e423-6d4e-4711-a06b-e316ed7bd94e/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-6796e423-6d4e-4711-a06b-e316ed7bd94e/packages"
        },
        "space": {
          "href": "/v2/spaces/e2fed64a-3211-413c-ac4d-0014bf21ed2c"
        },
        "start": {
          "href": "/v3/apps/guid-6796e423-6d4e-4711-a06b-e316ed7bd94e/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-6796e423-6d4e-4711-a06b-e316ed7bd94e/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-6796e423-6d4e-4711-a06b-e316ed7bd94e/current_droplet",
          "method": "PUT"
        }
      }
    },
    {
      "guid": "guid-f281af8f-4039-4ad8-bf54-25240c62f182",
      "name": "my_app2",
      "desired_state": "STOPPED",
      "total_desired_instances": 0,
      "created_at": "1970-01-01T00:00:02Z",
      "updated_at": null,
      "environment_variables": {

      },
      "_links": {
        "self": {
          "href": "/v3/apps/guid-f281af8f-4039-4ad8-bf54-25240c62f182"
        },
        "processes": {
          "href": "/v3/apps/guid-f281af8f-4039-4ad8-bf54-25240c62f182/processes"
        },
        "packages": {
          "href": "/v3/apps/guid-f281af8f-4039-4ad8-bf54-25240c62f182/packages"
        },
        "space": {
          "href": "/v2/spaces/e2fed64a-3211-413c-ac4d-0014bf21ed2c"
        },
        "start": {
          "href": "/v3/apps/guid-f281af8f-4039-4ad8-bf54-25240c62f182/start",
          "method": "PUT"
        },
        "stop": {
          "href": "/v3/apps/guid-f281af8f-4039-4ad8-bf54-25240c62f182/stop",
          "method": "PUT"
        },
        "assign_current_droplet": {
          "href": "/v3/apps/guid-f281af8f-4039-4ad8-bf54-25240c62f182/current_droplet",
          "method": "PUT"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ae360abd-fb5e-44cc-9f9b-ef75820f8ed0
Content-Length: 2751
X-Content-Type-Options: nosniff