Example 9: Retrieve a list of activities for a named file |
This example shows how an activity log is retrieved for a document using the guid. The server will return a list of activity log entries, which can then be iterated over.
Files files = apiSession.GetFilesResource(); // Create an object to specify the documents activityLog request GetDocumentActivityLogRequestJson getDocumentActivityLogRequestJson = new GetDocumentActivityLogRequestJson { // The guid of a document to retrieve activity for DocumentGuid = documentGuid, // Indicates if only the last action for a user should be retrieved LastActionPerUser = false, // Indicates the page number to fetch of a multipage response PageNumber = 1, // The number of items to fetch per page PageSize = 100 }; // Call the get activity method PagingItemListJson<ActivityLogRecordJson> result = files.GetActivityLogV30(getDocumentActivityLogRequestJson);