cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch the username/email(via api) who has uploaded the file in egnyte

Highlighted
Vigilante

Fetch the username/email(via api) who has uploaded the file in egnyte

Hi,

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.

 

Thanks,

Neha

0 Kudos
4 Replies
Highlighted
Moderator
Moderator

Re: Fetch the username/email(via api) who has uploaded the file in egnyte

Hi @NehaGupta 

Please refer to this User Management API Documentation and if you still have any questions you can open a ticket with support at support@egnyte.com

0 Kudos
Highlighted
Vigilante

Re: Fetch the username/email(via api) who has uploaded the file in egnyte

Yes. Thanks I did figure it out.

Now I’m looking for an Api which can provide me the history of a particular file. Is there any api around it?
0 Kudos
Highlighted
Moderator
Moderator

Re: Fetch the username/email(via api) who has uploaded the file in egnyte

Hi @NehaGupta 

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.).

0 Kudos
Highlighted
Vigilante

Re: Fetch the username/email(via api) who has uploaded the file in egnyte

Hi,

Thanks for the detailed explanation.

I think I will go with point no 1 to fetch the history of a file. I have the path and group_id of the file, and will use the file systems api to fetch the versions. I hope it works.
I will reach out if I’m stuck.

Thanks,
Neha
0 Kudos
Users online (140)