Skip to content

Commit

Permalink
Merge d471dab into f1a0aa4
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsocha2 authored Jan 31, 2023
2 parents f1a0aa4 + d471dab commit 46cbcde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion boxsdk/object/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def get_admin_events(
stream type. Used for historical querying (up to one year). Works for Enterprise admin_logs type.
:param limit:
(optional) Maximum number of events to return.
(optional) Maximum number of events to return. If None, default API value limit=100 will be used.
:param stream_position:
The location in the stream from which to start getting events. 0 is the beginning of time.
:param created_after:
Expand Down
3 changes: 2 additions & 1 deletion docs/usage/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ for event in events['entries']:
### Get Admin Events

The SDK also allows you to retrieve enterprise events. Use [`events.get_admin_events_streaming(self, limit=None, stream_position=0, event_types=None)`] for live monitoring (events up to two weeks, low latency) and [`events.get_admin_events(self, limit=None, stream_position=0, created_after=None, created_before=None, event_types=None)`] for historical querying (events up to one year, higher latency).

If `limit` param is set to None, then default API value (limit=100) will be used.
Live monitoring example

<!-- sample get_events enterprise_stream -->
Expand All @@ -124,6 +124,7 @@ Addditionally, a list of event types can be passed along to filter down the retu

When using historical querying you can specify before and after a certain datetime and the types of events to retrieve with the `event_type` by calling
[`events.get_admin_events(self, limit=None, stream_position=0, created_after=None, created_before=None, event_types=None)`][admin_events_details].
If `limit` param is set to None, then default API value (limit=100) will be used.
The format for the `created_after` and `created_before` fields are supported by [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) and look
something like this: 2019-08-12T09:12:36-00:00. For more information on the date format please see [here](https://developer.box.com/en/guides/api-calls/types-and-formats/#date-and-times).
This method returns a `dict` with the relevant [`Event`][event_class] objects in a `list` under the
Expand Down

0 comments on commit 46cbcde

Please sign in to comment.