Events

The Events API lets you track activity in your Egnyte domain. Use it to discover what has happened since a specific point in time, enabling your application to respond to file system changes, note updates, and permission modifications.

Note: The event stream stores the latest 500,000 events, up to a maximum of 30 days. Older events are not accessible via this API.

Base URL

https://{domain}.egnyte.com/pubapi/v1/events

Version 2 endpoints (which include permission change events) use:

https://{domain}.egnyte.com/pubapi/v2/events

Authentication

All requests require an OAuth 2.0 Bearer token in the Authorization header:

Authorization: Bearer {access_token}

See Authentication for details on obtaining a token.

Polling for Events

The Events API uses cursor-based polling to track changes. A cursor is a monotonically increasing number associated with each event. To watch for events:

  1. Get an initial cursor
  2. Poll periodically for new events after that cursor
  3. Update your cursor to the latest event ID received

Note: Poll at intervals of 5 minutes or more to avoid rate limiting.

Get Current Cursor

Retrieve the current cursor position in the event stream.

Request

GET /pubapi/v1/events/cursor

Example Request

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/events/cursor" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

200 OK

FieldTypeDescription
timestampstringISO-8601 formatted timestamp of the latest event
latest_event_idintegerThe most recent event ID available; use this as your starting cursor
oldest_event_idintegerThe oldest event ID still available in the stream

Example Response

{
  "latest_event_id": 16342,
  "oldest_event_id": 16321,
  "timestamp": "2025-05-28T11:41:12.000Z"
}

List Events (v1)

Retrieve events that occurred after a specified cursor. This endpoint returns file_system and note events by default.

Request

GET /pubapi/v1/events?id={cursor_id}

Query Parameters

ParameterTypeRequiredDefaultDescription
idintegerYesCursor ID from a previous call; returns events after this position
folderstringNoScope events to a specific folder path (includes subfolders); events are not guaranteed to move with renamed/moved folders
suppressstringNononeFilter out events: app (current application), user (current user), or none
typestringNofile_system|noteEvent types to return; use pipe (|) to separate multiple types (e.g., file_system|note)
countintegerNo50Maximum events per page (min: 1, max: 100)
reversestringNo0Set to 1 to traverse events in reverse order; returns events from (id - count + 1) to id

Example Request

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/events?id=16341" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

200 OK

FieldTypeDescription
latest_idintegerLatest event ID in this response; use as cursor for next poll
oldest_idintegerOldest event ID in this response
countintegerNumber of events returned
eventsarrayArray of event objects

Event Object

FieldTypeDescription
idintegerUnique event identifier
timestampstringISO-8601 formatted timestamp when the event was recorded
action_sourcestringSource of the event: WebUI, SyncEngine, Mobile, PublicAPI, WebEdit, System, VPC, or Other
actorintegerNumeric ID of the user who performed the action
typestringEvent type: file_system or note
actionstringAction performed: create, delete, restore, move, copy (rename is represented as move)
object_detailstring(Optional) URI to the affected resource. Present for file_system events (except delete) linking to the file metadata endpoint, and for note create events linking to the annotation endpoint. null or absent otherwise
dataobjectAdditional data specific to the event type and action

File System Event Data Fields

FieldTypeDescription
target_pathstringDestination path for move/copy operations
target_idstringUnique identifier of the file version at the target path
target_group_idstringUnique identifier of the file at the target path
source_pathstringOriginal path for move/copy operations
source_idstringUnique identifier of the file version at the source path
source_group_idstringUnique identifier of the file at the source path
is_folderbooleantrue if the object is a folder, false if it's a file

Note Event Data Fields

FieldTypeDescription
note_idstringUnique identifier of the note (comment/annotation)

Example Response

{
  "latest_id": 16342,
  "oldest_id": 16342,
  "count": 1,
  "events": [
    {
      "id": 16342,
      "timestamp": "2025-05-28T11:41:12.000Z",
      "action_source": "WebUI",
      "actor": 1,
      "type": "file_system",
      "action": "copy",
      "data": {
        "target_path": "/Shared/Documents/My Contract.docx",
        "target_id": "89b1e9d9-8a04-4277-807c-d68107796c76",
        "target_group_id": "48f2dade-cd0a-472e-ab81-ab4b78135328",
        "source_path": "/Shared/Contracts/My Contract.docx",
        "source_id": "85756cb4-7d82-439c-9ea4-be80eaebaecf",
        "source_group_id": "19f157de-267a-45e9-903a-a34fdf3a3e4e",
        "is_folder": false
      }
    }
  ]
}

204 No Content

No events occurred after the specified cursor for this user access token.

List Events (v2)

Retrieve events that occurred after a specified cursor. This endpoint returns file_system, note, and permission_change events by default.

Note: This is identical to v1 except it includes permission_change events by default. Use v2 if you need to track permission changes.

Request

GET /pubapi/v2/events?id={cursor_id}

Query Parameters

ParameterTypeRequiredDefaultDescription
idintegerYesCursor ID from a previous call; returns events after this position
folderstringNoScope events to a specific folder path (includes subfolders); events are not guaranteed to move with renamed/moved folders
suppressstringNononeFilter out events: app (current application), user (current user), or none
typestringNofile_system|note|permission_changeEvent types to return; use pipe (|) to separate multiple types
countintegerNo50Maximum events per page (min: 1, max: 100)
reversestringNo0Set to 1 to traverse events in reverse order; returns events from (id - count + 1) to id

Example Request

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v2/events?id=16320" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

200 OK

Returns the same structure as v1, with additional fields for permission_change events.

Permission Change Event Data Fields

FieldTypeDescription
target_pathstringFolder path where permissions were changed
is_folderbooleantrue if the object is a folder, false if it's a file
eventTypeSpecificAttributesobjectAdditional data specific to permission change events

Event Type Specific Attributes

FieldTypeDescription
changeGroupEventsarrayChanges that occurred to user groups
changePermissionEventobjectDetails about permission changes
changeContextobjectContext of the change; contains snapshot-restore ID if changed via snapshot restore
targetFolderIdstringUnique identifier of the folder where permissions changed
groupChangebooleantrue if changeGroupEvents contains at least one element

Change Permission Event

FieldTypeDescription
changedPermissionsarrayArray of permission change objects

Changed Permission Object

FieldTypeDescription
actionstringType of change: ADD or DELETE
entryobjectDetails about the permission change

Permission Entry

FieldTypeDescription
subjectstringUser or group identifier (e.g., /user/6)
privstringPermission level: NONE, VIEWER_ONLY, READ, READWRITE, RWD, or MODIFY

Example Response

{
  "latest_id": 16321,
  "oldest_id": 16321,
  "count": 1,
  "events": [
    {
      "id": 16321,
      "timestamp": "2024-10-21T05:10:53.000Z",
      "action_source": "WebUI",
      "actor": 1,
      "type": "permission_change",
      "action": "permission_change",
      "data": {
        "target_path": "/Shared/Permission Test/Viewer",
        "is_folder": false
      },
      "eventTypeSpecificAttributes": {
        "changeGroupEvents": [],
        "changePermissionEvent": {
          "changedPermissions": [
            {
              "action": "ADD",
              "entry": {
                "subject": "/user/6",
                "priv": "READ"
              }
            },
            {
              "action": "DELETE",
              "entry": {
                "subject": "/user/6",
                "priv": "NONE"
              }
            }
          ]
        },
        "changeContext": null,
        "targetFolderId": "dd3b7523-6851-4977-97a5-265e45004882",
        "groupChange": false
      }
    }
  ]
}

204 No Content

No events occurred after the specified cursor for this user access token.

Event Types

The Events API supports the following event types:

TypeDescriptionAvailable In
file_systemFile and folder operations (create, delete, move, copy, restore)v1, v2
noteNote-related activityv1, v2
permission_changePermission modifications on files and foldersv2 only (must be explicitly requested in v1)

Action Sources

Events can originate from multiple sources:

SourceDescription
WebUIEgnyte web interface
SyncEngineDesktop sync client
MobileMobile applications
PublicAPIAPI calls
WebEditOnline document editors
SystemSystem-generated events
VPCVirtual Private Cloud operations
OtherFTP, AD_KIT, EGD, OUTLOOK, GDRIVE_INTEG, SALESFORCE, MALWARE_DETECTION, TRASH_CLEANUP, BULK_IMPORT, UNKNOWN

Error Codes

StatusErrorDescriptionResolution
400Bad RequestInvalid cursor ID or malformed parametersVerify the id parameter is a valid integer; check query parameter format
401UnauthorizedInvalid or expired tokenRefresh your OAuth token
403ForbiddenInsufficient permissions to access eventsEnsure the user has appropriate permissions to view domain activity
404Not FoundCursor ID is outside the available rangeUse /events/cursor to get a valid starting cursor
429Rate LimitedToo many requestsWait at least 5 minutes between polling requests; implement exponential backoff

Code Examples

GET /pubapi/v1/events/cursor

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/events/cursor" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

GET /pubapi/v1/events?id={cursor}

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/events?id={cursor}" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

GET /pubapi/v2/events?id=16320&type=permission_change&count=100

curl -i -X GET "https://{domain}.egnyte.com/pubapi/v2/events?id=16320&type=permission_change&count=100" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Reference →Browse all endpoints