Skip to main content
Support

KB Article #176090

RESTAPI: Getting a transfer report for the past day

Problem

How to get a File Tracking report for the past day exported using the RESTful API?


Resolution

This can be achieved by using the RESTful API with cURL using the following command:


curl -k -X GET -H "Content-Type: application/xml" -H "Accept: application/xml" --user ADMINUSER:ADMINPASS "https://HOSTNAME:ADMINPORT/api/v1.1/transfers/export?startTimeAfter=`date -R -d "1 day ago" | sed "s/ /%20/g" | sed "s/+/%2b/g"`" > report.csv


In the above command replace:


ADMINUSER:ADMINPASS with the proper admin credentials

HOSTNAME with the hotname or IP of SecureTransport

ADMINPORT with the port, on which the ST's admin service runs on, default is 444


The following command narrows down the report to specific user account:


curl -k -X GET -H "Content-Type: application/xml" -H "Accept: application/xml" --user ADMINUSER:ADMINPASS  "https://HOSTNAME:ADMINPORT/api/v1.1/transfers/export?accountOrLogin=USER&startTimeAfter=`date -R -d "1 day ago" | sed "s/ /%20/g" | sed "s/+/%2b/g"`" > user-report.csv


In the above command replace:


ADMINUSER:ADMINPASS with the proper admin credentials

HOSTNAME with the hotname or IP of SecureTransport

ADMINPORT with the port, on which the ST's admin service runs on, default is 444

USER with the actual user for which the list of the transfers is needed


You can export montly or weekly reports by using "1 week ago" or "1 month ago" in place of "1 day ago" in the above commands.