Skip to content
  • There are no suggestions because the search field is empty.

How to Download file using Titan API

Question:

How can I download a file using the Titan API?

Reasoning

Administrators and developers may need to retrieve files programmatically from Titan for automation, integration, or testing purposes. The Titan API provides an endpoint that allows authenticated users to download files directly from a configured file storage location.

Answer

You can download files using the /Api/Files/Download/{FileId} endpoint available through the Titan API Swagger interface or by issuing a direct API request using tools such as PowerShell or cURL.

Steps

  1. Open a web browser.
  2. Navigate to:
    https://localhost:41443/swagger/index.html
  3. Change the Admin URL from localhost:41443 to localhost.
  4. Click Authorize.
  5. Enter your user credentials and authenticate.
  6. Expand the Files section.
  7. Locate the endpoint:
    /Api/Files/Download/{FileId} - Download File
  8. Click Try it out.
  9. Set the following parameters:
    • FileId: Specify the file name to download (for example: sampletext.txt).
    • fileType: Specify the file type or virtual folder (for example: myfiles).
  10. Click Execute.

Testing Using the Request URL

Copy the generated Request URL.

Open a new browser tab.

Paste the URL into the address bar and browse to it.

If prompted, log in using your user credentials.

The file should begin downloading.

Note: If you do not want to authenticate manually in the browser, you can include the username and password in the URL. 
example:
 
https://username:password@localhost/api/Files/Download/sampletext.txt?fileType=myfiles

Testing Using PowerShell

Copy the generated cURL command from the Swagger page.

Modify the command if necessary to run in PowerShell.

Example:

curl.exe -k --digest `
  "https://localhost/api/Files/Download/sampletext.txt?fileType=myfiles" `
    -H "Authorization: Basic dGVzdDoxMjM=" `
    -o "titansftp_2.0.26.2465.exe"
  1. Execute the command in PowerShell.
  2. Verify that the requested file is successfully downloaded.

Need More Help? We’ve Got You Covered.

If you didn’t find what you were looking for, our support team is here to help. Customers with active maintenance and support can join the help desk and Submit a ticket and one of our experts will follow up shortly.