List user and enterprise events

get
https://api.box.com/2.0
/events

Returns up to a year of past events for a given user or for the entire enterprise.

By default this returns events for the authenticated user. To retrieve events for the entire enterprise, set the stream_type to admin_logs. The user making the API call will need to have admin privileges, and the application will need to have the permission to access the event feed to get the enterprise event feed.

Request

application/json

Query Parameters

string / date-timein queryoptional
2012-12-12T10:53:43-08:00

The lower bound date and time to return events for. This can only be used when requesting the events with a stream_type of admin_logs. For any other stream_type this value will be ignored.

string / date-timein queryoptional
2013-12-12T10:53:43-08:00

The upper bound date and time to return events for. This can only be used when requesting the events with a stream_type of admin_logs. For any other stream_type this value will be ignored.

string arrayin queryoptional
ACCESS_GRANTED

A comma-separated list of events to filter by. This can only be used when requesting the events with a stream_type of admin_logs. For any other stream_type this value will be ignored.

integer / int64in queryoptional
50100500

Limits the number of events returned

stringin queryoptional
1348790499819

The location in the event stream to start receiving events from.

  • now will return an empty list events and the latest stream position for initialization.
  • 0 or null will return all events.
stringin queryoptional
all"all"

Defines the type of events that are returned

  • all returns everything for a user and is the default
  • changes returns events that may cause file tree changes such as file updates or collaborations.
  • sync is similar to changes but only applies to synced folders
  • admin_logs returns all events for an entire enterprise and requires the user making the API call to have admin permissions.

Value is one of all,changes,sync,admin_logs

Response

application/jsonEvents

Returns a list of event objects.

Events objects are returned in pages, with each page (chunk) including a list of event objects. The response includes a chunk_size parameter indicating how many events were returned in this chunk, as well as the next stream_position that can be queried.

application/jsonClient error

An unexpected client error.

get
List user and enterprise events
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -X GET https://api.box.com/2.0/events \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
Python
stream_position = 0
events = client.events().get_events(stream_position=stream_position)
stream_position = events['next_stream_position']
for event in events['entries']:
    print('Got {0} event that occurred at {1}'.format(event.event_type, event.created_at))
Node
client.events.get({stream_position: '1408838928446360'}, callback);