List all App Usage Events
GET /v2/app_usage_events
Events are sorted by internal database IDs. This order may differ from created_at.
Events close to the current time should not be processed because other events may still have open
transactions that will change their order in the results.
Request
Route
GET /v2/app_usage_events?results-per-page=1&after_guid=592eca0f-2148-4f97-86a9-1c67f0f52a02
Parameters
Name |
Description |
Valid Values |
Example Values |
page
|
Page of results to fetch
|
|
|
results-per-page
|
Number of results per page
|
|
|
order-direction
|
Order of the results: asc (default) or desc
|
|
|
inline-relations-depth
|
0 - don't inline any relations and return URLs. Otherwise, inline to depth N.
|
|
|
orphan-relations
|
0 - de-duplicate object entries in response
|
|
|
exclude-relations
|
comma-delimited list of relations to drop from response
|
|
|
include-relations
|
comma-delimited list of the only relations to include in response
|
|
|
after_guid
|
Restrict results to App Usage Events after the one with the given guid
|
|
|
results-per-page: 1
after_guid: 592eca0f-2148-4f97-86a9-1c67f0f52a02
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the event.
|
|
|
|
state
|
The desired state of the app or 'BUILDPACK_SET' when buildpack info has been set.
|
|
- STARTED
- STOPPED
- BUILDPACK_SET
|
|
package_state
|
The state of the package.
|
|
|
|
instance_count
|
How many instance of the app.
|
|
|
|
memory_in_mb_per_instance
|
How much memory per app instance.
|
|
|
|
app_guid
|
The GUID of the app.
|
|
|
|
app_name
|
The name of the app.
|
|
|
|
org_guid
|
The GUID of the organization.
|
|
|
|
space_guid
|
The GUID of the space.
|
|
|
|
space_name
|
The name of the space.
|
|
|
|
buildpack_guid
|
The GUID of the buildpack used to stage the app.
|
|
|
|
parent_app_guid
|
The GUID for a parent v3 application if one exists
|
|
|
|
parent_app_name
|
The name for a parent v3 application if one exists
|
|
|
|
process_type
|
The process_type for applictions.
|
|
|
|
buildpack_name
|
The name of the buildpack or the URL of the custom buildpack used to stage the app.
|
|
|
- https://example.com/buildpack.git
- admin_buildpack
|
created_at
|
The timestamp when the event is recorded. It is possible that later events may have earlier created_at values.
|
|
|
|
Headers
cURL
curl "https://api.[your-domain.com]/v2/app_usage_events?results-per-page=1&after_guid=592eca0f-2148-4f97-86a9-1c67f0f52a02" -X GET \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTkxIiwiZW1haWwiOiJlbWFpbC02MkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUzODM3MjU4fQ.hUaWt25DnaI5Dfyt67-MD--TjbvB8Ub3kX4Emq-DBpc" \
-H "Host: example.org" \
-H "Cookie: "
Response
Status
200 OK
Body
{
"total_results": 2,
"total_pages": 2,
"prev_url": null,
"next_url": "/v2/app_usage_events?after_guid=592eca0f-2148-4f97-86a9-1c67f0f52a02&order-direction=asc&page=2&results-per-page=1",
"resources": [
{
"metadata": {
"guid": "8a74f5c5-dc0b-4ffa-97e4-343fa62879cb",
"url": "/v2/app_usage_events/8a74f5c5-dc0b-4ffa-97e4-343fa62879cb",
"created_at": "2016-01-19T19:40:58Z"
},
"entity": {
"state": "STARTED",
"memory_in_mb_per_instance": 564,
"instance_count": 1,
"app_guid": "guid-ca0a6c4f-c403-4084-a65a-4394612d4766",
"app_name": "name-280",
"space_guid": "guid-c338926c-33ba-4267-86b6-1360902f9076",
"space_name": "name-281",
"org_guid": "guid-72f748b2-4d3f-48d4-9054-cef23cee26d1",
"buildpack_guid": "guid-bbd57167-2e8f-44f8-a950-3b33ad0e07f2",
"buildpack_name": "name-282",
"package_state": "STAGED",
"parent_app_guid": null,
"parent_app_name": null,
"process_type": "web"
}
}
]
}
Headers