i am developing a microservice which reads through egnyte folders and saves application related details.
I have used events api to poll egnyte. Now I want the username or email id of the user who has uploaded/deleted the file. How do I fetch it? Im unable to find any api for this.
I have tried List files API but it doesnt provide the complete username.
Any help in this will be really appreciated.
I reached out to one of our experts on API's to get you an answer:
The problem with tracking the history of a file is that you need to be aware of how files exist in Egnyte. Each file has a unique identifier called the "group_id." This group_id will be the same, regardless of where this particular file sits in the folder structure. If you move it from path A to path B, the group_id will remain the same. The reason this is important to note is that it now presents 2x different ways of tracking the file:
1. You can track the path of the file and all changes associated with the given path. This is less precise because theoretically, a file can be removed from path A and another file put in its place with the same name (new file with the same path), and now you are, in fact tracking a different file. This method of tracking a file is supported through some of our different API endpoints: events API, audit reports API, and in a limited capacity, the file system API. File paths, from a search perspective, are much more widely supported in our API because they are user-defined variables (i.e., end-user picks where a file goes, but NOT the group_id of the file).
2. You can attempt to track a file by using the group_id, but it is a lot more of an involved process. First, you would need to generate audit reports going back to when you first set up your Egnyte domain. Secondly, you would need to get the group_id of the particular file you wanted to track. This could be gathered through the file system API. Finally, you would need to concatenate all the reports together, sort them by date and filter by the source and target group_id fields. I'm sure you can see how this is not ideal.
Something else to take into account is the point of time that you want to begin tracking a file comes into play also, due to the limitations of our different APIs. For instance, the events API is relevant from the current time, going back X amount of individual events. If the file as created before this window, you will NOT be able to track it back further via the events API. Our audit reports can only be generated in increments of 90 days. So, if you require a more in-depth analysis of a file, you may have to get crafty with how you gather the data (i.e., paginating events, concatenating audit reports, etc.).
Egnyte transforms business through smarter content allowing organizations to connect, protect, and unlock value from all their content.
© Egnyte, Inc. All Rights Reserved
If you can't find what you're looking for, contact Egnyte Customer Support.