API - Download a file

So far, you've learned how to authenticate and list files within a specific folder. Now, let's take it a step further and explore broader file management capabilities. In this section, you'll learn how to:

  • Check the status of a file
  • Download a file
  • List all accessible files

List files

First let list files. We already discussed listing files in single folder. Now we'll list files in general. for that we can use GET /vault_rest/files/{type}/{start}/{count}endpoint.

  • type: Accepts either "my" or "all".

    • myreturns only your own files.
    • all includes all file you can access that can include your files as well as any files shared with you...
  • startand count: These parameters allow you to paginate results by specifying where to begin and how many files to retrieve.

Lets see an example

Powershell
Response
Copy

Now lets look at one single file

File status

We can get status of single file with GET /vault_rest/file/status/{file_id} endpoint. File status will have data on access rights, file type and security scanning.

Powershell
Response
Copy

Download file

Now that we listed files, checked file status, lets downloaded it. For that well use GET /vault_rest/file/{file_id}endpoint. In our example we had file_id and from that we got file name. You can get file name and id by listing your files.

Powershell
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard