Skip to content

Commit a211fbd

Browse files
Fixed link; removed extraneous example output [#162615959]
1 parent eec7039 commit a211fbd

File tree

1 file changed

+2
-125
lines changed

1 file changed

+2
-125
lines changed

managing-cf/app-event.html.md.erb

Lines changed: 2 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ owner: CAPI
77

88
This topic explains how to query the Cloud Controller API (CAPI) to retrieve current information about apps and events.
99

10+
1011
## <a id='target'></a> Target and Log In
1112

1213
To perform the procedures in this topic, you must target the endpoint of your Cloud Controller and log in. If you do not have the cf CLI installed, see the [Installing the cf CLI](../../cf-cli/install-go-cli.html) topic.
@@ -147,139 +148,15 @@ $ cf curl /v2/apps/acf2ce75-ee92-4bb6-9adb-55a596a8dcba/summary
147148
"version": null
148149
[...]
149150
</pre>
150-
151-
To view the `app_usages` report that covers app usage within an org during a period of time, see [Obtain Usage Information About an Org](#individual_org).
152151

153152
### <a id='events'></a> Events
154153

155154
Use the `events` endpoint to retrieve information about app events.
156155

157-
<pre class='terminal'>
158-
$ cf curl /v2/events
159-
{
160-
"total_results": 3,
161-
"total_pages": 1,
162-
"prev_url": null,
163-
"next_url": null,
164-
"resources": [
165-
{
166-
"metadata": {
167-
"guid": "b8ede8e1-afc8-40a1-baae-236a0a77b27b",
168-
"url": "/v2/events/b8ede8e1-afc8-40a1-baae-236a0a77b27b",
169-
"created_at": "2016-06-08T16:41:23Z",
170-
"updated_at": "2016-06-08T16:41:26Z"
171-
},
172-
"entity": {
173-
"type": "name-167",
174-
"actor": "guid-008640fc-d316-4602-9251-c8d09bbdc750",
175-
"actor_type": "name-168",
176-
"actor_name": "name-169",
177-
"actee": "guid-e7790fa4-be2b-4a0f-aa82-c124342b0bb4",
178-
"actee_type": "name-170",
179-
"actee_name": "name-171",
180-
"timestamp": "2016-06-08T16:41:23Z",
181-
"metadata": {
182-
183-
},
184-
"space_guid": "3a1368e7-e3b7-46af-a98d-57b9c71445e7",
185-
"organization_guid": "86aa12ee-8c4f-4b26-b391-2be6c1730dbc"
186-
}
187-
},
188-
{
189-
"metadata": {
190-
"guid": "2ccf53a8-d0eb-4807-9bb9-7dd844e65267",
191-
"url": "/v2/events/2ccf53a8-d0eb-4807-9bb9-7dd844e65267",
192-
"created_at": "2016-06-08T16:41:23Z",
193-
"updated_at": "2016-06-08T16:41:26Z"
194-
},
195-
"entity": {
196-
"type": "name-175",
197-
"actor": "guid-52cb38f4-d52d-4201-87e3-8e5650efc8c1",
198-
"actor_type": "name-176",
199-
"actor_name": "name-177",
200-
"actee": "guid-5c4214a1-f295-42ae-bd92-38e7cb8be538",
201-
"actee_type": "name-178",
202-
"actee_name": "name-179",
203-
"timestamp": "2016-06-08T16:41:23Z",
204-
"metadata": {
205-
206-
},
207-
"space_guid": "10f0fd9d-dd68-428e-8e93-c00bb8eff0a6",
208-
"organization_guid": "aa3fdaaa-42c8-4141-bc22-9792c37aa62f"
209-
}
210-
},
211-
{
212-
"metadata": {
213-
"guid": "4f9b1fef-2ce4-4877-85e1-0da9114a92cb",
214-
"url": "/v2/events/4f9b1fef-2ce4-4877-85e1-0da9114a92cb",
215-
"created_at": "2016-06-08T16:41:23Z",
216-
"updated_at": "2016-06-08T16:41:26Z"
217-
},
218-
"entity": {
219-
"type": "name-183",
220-
"actor": "guid-d3be7ed1-1c08-43f6-a20d-5cd9287492e1",
221-
"actor_type": "name-184",
222-
"actor_name": "name-185",
223-
"actee": "guid-9844795f-943d-47ed-a997-2c04ee611f5a",
224-
"actee_type": "name-186",
225-
"actee_name": "name-187",
226-
"timestamp": "2016-06-08T16:41:23Z",
227-
"metadata": {
228-
229-
},
230-
"space_guid": "f9ef235c-25df-4aa1-bcb4-15eec6f92146",
231-
"organization_guid": "24a920db-f551-46af-bf73-e1db972f652a"
232-
}
233-
}
234-
]
235-
}
236-
</pre>
237-
238156
For more information, see the [Audit Events](./audit-events.html) topic and [List all Events](https://apidocs.cloudfoundry.org/6.7.0/events/list_all_events.html) in the Cloud Foundry API documentation.
239157

240158
### <a id='app-usage-events'></a> App Usage Events
241159

242160
Use the `app-usage-events` endpoint to retrieve information about app usage events.
243161

244-
<pre class='terminal'>
245-
$ cf curl /v2/app_usage_events
246-
{
247-
"total_results": 2,
248-
"total_pages": 2,
249-
"prev_url": null,
250-
"next_url": "/v2/app_usage_events?after_guid=5a3416b0-cf3c-425a-a14c-45a317c497ed&order-direction=asc&page=2&results-per-page=1",
251-
"resources": [
252-
{
253-
"metadata": {
254-
"guid": "b32241a5-5508-4d42-893c-360e42a300b6",
255-
"url": "/v2/app_usage_events/b32241a5-5508-4d42-893c-360e42a300b6",
256-
"created_at": "2016-06-08T16:41:33Z"
257-
},
258-
"entity": {
259-
"state": "STARTED",
260-
"previous_state": null,
261-
"memory_in_mb_per_instance": 564,
262-
"previous_memory_in_mb_per_instance": null,
263-
"instance_count": 1,
264-
"previous_instance_count": null,
265-
"app_guid": "guid-d9fbb7f8-cba5-44a2-b720-c24f1fe5e1c4",
266-
"app_name": "name-1663",
267-
"space_guid": "guid-5e28f12f-9d80-473e-b826-537b148eb338",
268-
"space_name": "name-1664",
269-
"org_guid": "guid-036444f4-f2f5-4ea8-a353-e73330ca0f0a",
270-
"buildpack_guid": "guid-df37754c-819b-4697-a523-4b457d3c83dd",
271-
"buildpack_name": "name-1665",
272-
"package_state": "STAGED",
273-
"previous_package_state": null,
274-
"parent_app_guid": null,
275-
"parent_app_name": null,
276-
"process_type": "web",
277-
"task_name": null,
278-
"task_guid": null
279-
}
280-
}
281-
]
282-
}
283-
</pre>
284-
285-
For more information, see the [Usage Events and Billing](./usage-events.html) topic and [List all App Usage Events](https://apidocs.cloudfoundry.org/6.7.0/app_usage_events/list_all_app_usage_events.html) in the Cloud Foundry API documentation.
162+
For more information, see the [Usage Events and Billing](./usage-events.html) topic and [List all App Usage Events](https://apidocs.cloudfoundry.org/6.7.0/app_usage_events/list_all_app_usage_events.html) in the Cloud Foundry API documentation.

0 commit comments

Comments
 (0)