|
1 | 1 | # EventsManager
|
2 | 2 |
|
3 |
| -- [List user and enterprise events](#list-user-and-enterprise-events) |
4 | 3 | - [Get events long poll endpoint](#get-events-long-poll-endpoint)
|
5 |
| - |
6 |
| -## List user and enterprise events |
7 |
| - |
8 |
| -Returns up to a year of past events for a given user |
9 |
| -or for the entire enterprise. |
10 |
| - |
11 |
| -By default this returns events for the authenticated user. To retrieve events |
12 |
| -for the entire enterprise, set the `stream_type` to `admin_logs_streaming` |
13 |
| -for live monitoring of new events, or `admin_logs` for querying across |
14 |
| -historical events. The user making the API call will |
15 |
| -need to have admin privileges, and the application will need to have the |
16 |
| -scope `manage enterprise properties` checked. |
17 |
| - |
18 |
| -This operation is performed by calling function `getEvents`. |
19 |
| - |
20 |
| -See the endpoint docs at |
21 |
| -[API Reference](https://developer.box.com/reference/get-events/). |
22 |
| - |
23 |
| -<!-- sample get_events --> |
24 |
| - |
25 |
| -```ts |
26 |
| -await client.events.getEvents({ |
27 |
| - streamType: 'admin_logs' as GetEventsQueryParamsStreamTypeField, |
28 |
| - limit: 1, |
29 |
| - createdAfter: createdAfterDate, |
30 |
| - createdBefore: createdBeforeDate, |
31 |
| -} satisfies GetEventsQueryParams); |
32 |
| -``` |
33 |
| - |
34 |
| -### Arguments |
35 |
| - |
36 |
| -- queryParams `GetEventsQueryParams` |
37 |
| - - Query parameters of getEvents method |
38 |
| -- headersInput `GetEventsHeadersInput` |
39 |
| - - Headers of getEvents method |
40 |
| -- cancellationToken `undefined | CancellationToken` |
41 |
| - - Token used for request cancellation. |
42 |
| - |
43 |
| -### Returns |
44 |
| - |
45 |
| -This function returns a value of type `Events`. |
46 |
| - |
47 |
| -Returns a list of event objects. |
48 |
| - |
49 |
| -Events objects are returned in pages, with each page (chunk) |
50 |
| -including a list of event objects. The response includes a |
51 |
| -`chunk_size` parameter indicating how many events were returned in this |
52 |
| -chunk, as well as the next `stream_position` that can be |
53 |
| -queried. |
| 4 | +- [List user and enterprise events](#list-user-and-enterprise-events) |
54 | 5 |
|
55 | 6 | ## Get events long poll endpoint
|
56 | 7 |
|
@@ -112,3 +63,52 @@ This function returns a value of type `RealtimeServers`.
|
112 | 63 |
|
113 | 64 | Returns a paginated array of servers that can be used
|
114 | 65 | instead of the regular endpoints for long-polling events.
|
| 66 | + |
| 67 | +## List user and enterprise events |
| 68 | + |
| 69 | +Returns up to a year of past events for a given user |
| 70 | +or for the entire enterprise. |
| 71 | + |
| 72 | +By default this returns events for the authenticated user. To retrieve events |
| 73 | +for the entire enterprise, set the `stream_type` to `admin_logs_streaming` |
| 74 | +for live monitoring of new events, or `admin_logs` for querying across |
| 75 | +historical events. The user making the API call will |
| 76 | +need to have admin privileges, and the application will need to have the |
| 77 | +scope `manage enterprise properties` checked. |
| 78 | + |
| 79 | +This operation is performed by calling function `getEvents`. |
| 80 | + |
| 81 | +See the endpoint docs at |
| 82 | +[API Reference](https://developer.box.com/reference/get-events/). |
| 83 | + |
| 84 | +<!-- sample get_events --> |
| 85 | + |
| 86 | +```ts |
| 87 | +await client.events.getEvents({ |
| 88 | + streamType: 'admin_logs' as GetEventsQueryParamsStreamTypeField, |
| 89 | + limit: 1, |
| 90 | + createdAfter: createdAfterDate, |
| 91 | + createdBefore: createdBeforeDate, |
| 92 | +} satisfies GetEventsQueryParams); |
| 93 | +``` |
| 94 | + |
| 95 | +### Arguments |
| 96 | + |
| 97 | +- queryParams `GetEventsQueryParams` |
| 98 | + - Query parameters of getEvents method |
| 99 | +- headersInput `GetEventsHeadersInput` |
| 100 | + - Headers of getEvents method |
| 101 | +- cancellationToken `undefined | CancellationToken` |
| 102 | + - Token used for request cancellation. |
| 103 | + |
| 104 | +### Returns |
| 105 | + |
| 106 | +This function returns a value of type `Events`. |
| 107 | + |
| 108 | +Returns a list of event objects. |
| 109 | + |
| 110 | +Events objects are returned in pages, with each page (chunk) |
| 111 | +including a list of event objects. The response includes a |
| 112 | +`chunk_size` parameter indicating how many events were returned in this |
| 113 | +chunk, as well as the next `stream_position` that can be |
| 114 | +queried. |
0 commit comments