View Activities in Edge Drive (REST API: GET)

Updated

This operation allows you to view the activities performed on a file or folder in Edge Drive or shares created from Edge Drive or a Collaborative share.

Request

Syntax

GET <webservice>/drive/audit/activities?fileId={fileId}&versionId={versionGuid}&pageSize={pageSize}&offset={offset}&shareId={shareId}, HTTP/1.1

Host: <host name>

Accept: application/xml

Authtoken: <authentication token>

where <webservice> is the root path used to route the API requests to the Web Server.

For more information, see Available Web Services for REST API.

Request Headers

Name

Description

Host

The host name of the Web Server or Web Console used in the API request.

Accept

The format of the response. Valid values are: application/xml or application/json.

Authtoken

The authentication token received after successfully logging on. For details on receiving an authentication token, see Authentication.

Request Parameters

Name

Description

Required

fileID

The GUID of the file. GUID is a unique identifier for a file or folder and remains the same even when you rename or move the file or folder to another path. To retrieve the GUID of the file, see Viewing File or Folder Properties.

No

versionID

The GUID of the file version. To retrieve the GUID of all the file versions, see View Versions of a File in Edge Drive.

No

pagesize

The number of activities that you want to view in the response. The default value is 10.

No

offset

The number from which the activities will be displayed. For example: if the pagesize is 10, and you want to view from activity 11 to 20, set the offset value to 11. The default value is 0.

No

shareId

Applies only to shared files or folders. The unique identifier (syncWebFolderId response) returned when you share a file or folder or view the shared files and folders. If the shareId is not known, see View Shared Files and Folders to retrieve it.

No

Response

Response Parameters

Parameter

Description

Element

totalCount

Total number of activities

Api_GetEdgeActivityResponse

IsAuditEnabled

Indicates if auditing is enabled or not. 1 indicates activity is enabled and 0 indicates activity is not enabled.

Api_GetEdgeActivityResponse

hostName

The host name or IP address of the device or computer from where the activity was performed.

activityList

fileName

The name of the file for which the activity is displayed.

activityList

oldFileName

The previous name of the file. Applicable when you rename a file.

activityList

itemGuid

The GUID of the file or folder.

activityList

appId

The subclient ID of Edge Drive client.

activityList

createdTime

The time, in UNIX format, when the activity was performed.

activityList

consoleType

The console on which the activity was performed. Valid values are:

  • 3 - iOS

  • 4 - AutoUploaderApp

  • 9 - CVEdgeDriveAddin

  • 10 - Android

  • 12 - CVExplorerPlugin

  • 16 - API

  • 19 - Web Console

activityList

clientId

Client ID of the Web Server.

activityList

userDisplayName

Display name of the user who performed the activity.

activityList

shareId

Applies to shared files or folders.

The unique identifier (syncWebFolderId response) returned when you share a file or folder or view the shared files and folders in Edge Drive.

activityList

userGuid

The GUID of the user who performed the activity.

activityList

userName

User name of the user who performed the activity.

activityList

userId

The ID of the user who performed the activity.

activityList

isFolder

Specifies if the activity is performed on a folder or a file. Valid values are :

  • True - if activity performed on a folder.

  • False - if activity is performed on a file.

activityList

parentName

Name of the parent folder.

activityList

parentGuid

The GUID of the parent folder.

activityList

shareName

Applies to shared files or folders.

Name of the share.

activityList

shareOwnerId

Applies to shared files or folders. The ID of the share owner.

activityList

Examples

Same Request

To view the last 10 activities in your Edge Drive:

GET <webservice>/drive/audit/activities HTTP/1.1

Host: client.mydomain.com

Accept: application/xml

Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc6

0f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f

8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f

40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef7

68fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f323

3d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8

Sample Response

XML Response

<Api_GetEdgeActivityResponse totalCount="56" IsAuditEnabled="1">  <activityList hostName="172.25.33.54" fileName="Search_DRIVE.xml" sizeInBytes="2649" type="2" oldParentName="" versionGuid="af9e1b2f5eb61f60616013058f358fca" shareType="0" deviceId="172.25.33.54" oldFileName="" itemGuid="73d6599109ec4dbfbd299fa4ada9c913" appId="7" createdTime="1506709208" consoleType="19" clientId="2" userDisplayName="Administrator" shareId="0" userGuid="679BB06C-A73C-400F-AAB5-945A65CE24B7" userName="admin" userId="1" isFolder="0" parentName="" parentGuid="4db64b09f1614e53a32e9d7762eba42f" shareName="" shareOwnerId="0" />

</Api_GetEdgeActivityResponse>

JSON Response

{     "totalCount":56,   "IsAuditEnabled":true,   "activityList":[        {           "hostName":"172.25.33.54",         "fileName":"Search_DRIVE.xml",         "sizeInBytes":2649,         "type":2,         "oldParentName":"",         "versionGuid":"af9e1b2f5eb61f60616013058f358fca",         "shareType":0,         "deviceId":"172.25.33.54",         "oldFileName":"",         "itemGuid":"73d6599109ec4dbfbd299fa4ada9c913",         "appId":7,         "createdTime":1506709208,         "consoleType":19,         "clientId":2,         "userDisplayName":"Administrator",         "shareId":0,         "userGuid":"679BB06C-A73C-400F-AAB5-945A65CE24B7",         "userName":"admin",         "userId":1,         "isFolder":false,         "parentName":"",         "parentGuid":"4db64b09f1614e53a32e9d7762eba42f",         "shareName":"",         "shareOwnerId":0      }   ]

}

Supported Error Codes

Code

Status

Description

401

Unauthorized

The authorization token is invalid.

500

InternalServerError

Unexpected error in processing the request

404

Not Found

The specified file or folder does not exist.