Reports

Operations to create, run, and access Reports covering Usage and other data from a ShareFile account

Get Reports for Current Account

GET https://account.sf-api.com/sf/v3/Reports 

Returns all the reports configured for the current account. By expanding the Records property, a list of all ReportRecords can be accessed as well.

Returns: Reports for current account

Get Report by ID

GET https://account.sf-api.com/sf/v3/Reports(id) 

Returns a single report specified by id. The Records property is expandable.

idString

Returns: Single Report

Get recent reports

GET https://account.sf-api.com/sf/v3/Reports/Recent?maxReports=10 

Returns the most recent reports run for the current account. 10 reports are returned unless otherwise specified.

maxReportsInt32

Returns: List of reports

Get recurring reports

GET https://account.sf-api.com/sf/v3/Reports/Recurring 

Returns all recurring reports for the current account.

Returns: List of reports

Get Report Record by ID

GET https://account.sf-api.com/sf/v3/Reports/Record(id) 

Returns a single record.

idString

Returns: Single Record

Get all Records by Report ID

GET https://account.sf-api.com/sf/v3/Reports(id)/Records 

Returns all records for a single report.

idString

Returns: Records for a Report

Create Report

POST https://account.sf-api.com/sf/v3/Reports?runOnCreate=false 
            { 
              "Title": "Usage Report", 
              "ReportType": "Activity", 
              "ActivityTypes": "Login,Upload,Download,View", 
              "ObjectType": "Account", 
              "ObjectId": "accountId", 
              "DateOption": "Last30Days", 
              "SaveFormat": "Excel" 
            } 

Creates a new Report. The sample above is for an Account Activity Report. For more options please refer to the Report model documentation.

reportReport
runOnCreateBoolean Whether this report should run on creation

Returns: Created Report

Update Report

PATCH https://account.sf-api.com/sf/v3/Reports 
            { 
              "IsRecurring":false, 
              "IsScheduled":false, 
              "Frequency": "Once" 
            } 

Updates an existing report

reportReport

Returns: the updated report

Delete Report

DELETE https://account.sf-api.com/sf/v3/Reports(id) 

Removes a report from the system

idString

Run Report

GET https://account.sf-api.com/sf/v3/Reports(id)/Run 

Run a report and get the run id.

Returns: ReportRecord

Get a preview location for the report

POST https://account.sf-api.com/sf/v3/Reports(reportId)/Preview 
reportIdString Report ID

Get JSON Data

GET https://account.sf-api.com/sf/v3/Reports/Records(id)/GetJsonData 

Get the JSON data for a report

idString

Returns: JSON Formatted Report Results

Save a folder to a folder location

POST https://account.sf-api.com/sf/v3/Reports(reportId)/Move?folderId=folderId 
reportIdString Report ID
folderIdString Target folder ID

Get spreadsheet data

GET https://account.sf-api.com/sf/v3/Reports/Records(id)/DownloadData?getSignedUrl=false 

Download spreadsheet data for a report. If parameter "getSigndedUrl" is true, this endpoint returns a Download Specification object with a "url" parameter, which will point to the file's location

idString
getSignedUrlBoolean Used to specify whether or not to get a download specification

Returns: Excel Formatted Report Results or Download Specification

Get spreadsheet data

GET https://account.sf-api.com/sf/v3/Reports/Records(id)/DownloadData?token=123 
idString
tokenString Token from call to Reports/Records(id)/DownloadData?getSignedUrl=true

Returns: Excel Formatted Report Results