Our system uploaded the exported Inventory All Fields file into Egnyte Plateform every day for each facility. I need to analyze this file to create two reports each week. (Each file is about 70M or more).
By using my regular Egnyte account, I can login to the website, find the file and download it into my computer. Then import the data into Sqlite database, run some query commands to get the data. Copy the data into Excel file, format it and send email to our manager.
It would be great if I can do all these automatically using a script. Fortunately Egnyte provides some APIs that I can use to access the files programmatically.
Egnyte Developer Account
Pre-requirement:
You need to get a regular Egnyte account before you register a developer account.
Register
- Register a developer account from here
- Egnyte API Support team will approve your API key request through your email
Note:
- Email: Use the email related/linked to your Egnyte domain account
Get API Key
- Login to Egnyte developer website
- Click Get API Key
- From the page you can see the Application name, Key, Secret, Status, User Rate Limits information
Get Internal Application Token
See here for details.
For Internal Application, send the authentication request to {yourdomail}/puboauth/token
.
Note:
- Please save this access token and use it when making API requests for this user.
- This token does not expire until the user’s password is changed.
How to get file link?
See File System API
URL ENCODING Note:
The Path parameter in the API endpoints described below must be URL encoded in a special way. Each element of the path needs to be separately encoded. I.e. the forward slashes (’/’) in the path must not be encoded, but the text in between must be. This is required because filesystem paths on Egnyte can contain characters which are not permitted in the path portion of a URL.
For example, this path: Shared/example?path/$file.txt should be encoded as Shared/example%3Fpath/%24file.txt
|
|
How to download Egnyte file using Go?
|
|