Standard Parameters for all methods
account={account}&dataConnect={dataConnect}&clientId={clientId}&userId={userId}&userRole={userRole}
Methods
GET /GetSavedReports Query Parameters (in addition to standard parameters) None Success Response Get a List of all Reports Example Response[ { "reportId": 1, "folderId": "1", "reportName": "Orders", "reportDescription": "This report shows all Orders", "reportType": "Summary", "userId": "", // "userRole": "",
"viewOnlyUserId": "", "viewOnlyUserRole": "", "clientId": "", "canEdit": true, } ]
Response Notes userId - Can be a comma separated list of users that have access to manage the report. If empty, there are no restrictions any user can manage the report. userRole, viewOnlyUserId, viewOnlyUserRole - Very similar to userId, can be a comma separated list indicating who can manage/view the report, and empty implies no restrictions. If viewOnly fields are specified, they they take precedence over manage.
GET / LoadReport
Query Parameters (in addition to standard parameters)
reportId - id of the report to load
Success Response
Get details of the Report
Example Response
{
"ReportID": 13102,
"ConnectionString": null,
"ReportName": "Orders count this Year by Month",
"ReportDescription": "This report gives a total count of all the orders done each month this year",
"FolderID": 2077,
"SelectedFieldItems": null,
"SelectedFieldIDs": [
2398,
2387,
2459,
2462
],
"SelectedFilters": null,
"IncludeSubTotals": true,
"ShowUniqueRecords": false,
"IsAggregateReport": true,
"ShowDataWithGraph": true,
"ShowOnDashboard": true,
"ShowAdminOnly": false,
"EditFiltersOnReport": false,
"UseReportHeader": true,
"HideReportHeader": false,
"MaxRecords": 0,
"ClientId": null,
"UserId": "Guest",
"ViewOnlyUserId": "",
"UserRoles": "",
"ViewOnlyUserRoles": "",
"SortBy": 2398,
"SortDesc": false,
"GroupFunctionList": [
{
"FieldID": 2398,
"ColumnId": null,
"GroupFunc": "Group by Month",
"FilterOnFly": false,
"HideInDetail": false,
"Disabled": false,
"GroupInGraph": false,
"IsCustom": false,
"CustomLabel": null,
"DataFormat": null,
"FieldLabel": null,
"FieldAlign": null,
"FontColor": null,
"BackColor": null,
"HeaderFontColor": null,
"HeaderBackColor": null,
"DecimalPlaces": null,
"FontBold": false,
"HeaderFontBold": false,
"DontSubTotal": false,
"FieldWidth": null,
"FieldConditionOp": null,
"FieldConditionVal": null,
"CustomFieldDetails": [],
"LinkField": false,
"LinkFieldItem": null
},
{
"FieldID": 2459,
"ColumnId": null,
"GroupFunc": "Average",
"FilterOnFly": false,
"HideInDetail": false,
"Disabled": false,
"GroupInGraph": false,
"IsCustom": false,
"CustomLabel": null,
"DataFormat": null,
"FieldLabel": null,
"FieldAlign": null,
"FontColor": null,
"BackColor": null,
"HeaderFontColor": null,
"HeaderBackColor": null,
"DecimalPlaces": null,
"FontBold": false,
"HeaderFontBold": false,
"DontSubTotal": false,
"FieldWidth": null,
"FieldConditionOp": null,
"FieldConditionVal": null,
"CustomFieldDetails": [],
"LinkField": false,
"LinkFieldItem": null
},
{
"FieldID": 2462,
"ColumnId": null,
"GroupFunc": "Sum",
"FilterOnFly": false,
"HideInDetail": false,
"Disabled": false,
"GroupInGraph": false,
"IsCustom": false,
"CustomLabel": null,
"DataFormat": null,
"FieldLabel": null,
"FieldAlign": null,
"FontColor": null,
"BackColor": null,
"HeaderFontColor": null,
"HeaderBackColor": null,
"DecimalPlaces": null,
"FontBold": false,
"HeaderFontBold": false,
"DontSubTotal": false,
"FieldWidth": null,
"FieldConditionOp": null,
"FieldConditionVal": null,
"CustomFieldDetails": [],
"LinkField": false,
"LinkFieldItem": null
}
],
"ReportType": "Bar",
"UseStoredProc": false,
"StoredProcId": null,
"SelectedFields": [
{
"fieldId": 2398,
"fieldName": "Order date",
"fieldFormat": null,
"fieldLabel": null,
"fieldAlign": null,
"fontColor": null,
"backColor": "#ffffff",
"headerFontColor": null,
"headerBackColor": "#ffffff",
"decimalPlaces": null,
"fontBold": false,
"headerFontBold": false,
"dontSubtotal": false,
"fieldWidth": null,
"fieldConditionOp": null,
"fieldConditionVal": null,
"fieldAggregate": [
"Group",
"Group by Day",
"Group by Month",
"Group by Year",
"Group by Month/Year",
"Count",
"Count Distinct",
"% over Count",
"Sum",
"Max",
"Min",
"Do Not Display"
],
"fieldFilter": [],
"fieldType": "Int",
"hasForeignKey": false,
"tableName": "Detailed Order",
"aggregateFunction": "Sum",
"filterOnFly": false,
"hideInDetail": false,
"disabled": false,
"groupInGraph": false,
"dbField": "[Order Details Extended].[Quantity]",
"isFormulaField": false,
"formulaItems": [],
"linkField": false,
"linkFieldItem": null
}
],
"Filters": [],
"DrillDownRow": null,
"Series": [],
"Schedule": null,
"DataFilters": {},
"SelectedSorts": [],
"SelectedParameters": []
}
POST /RunReport Form Parameters (in addition to standard parameters) SaveReport - Flag to indicate if report should be saved or not ReportJson - Required report structure to process report SubTotalMode - Flag to indicate if were running subtotals for the report UserIdForSchedule - Separate User Id to use for saving separate schedule by user UserIdForFilter - Separate User Id to use for saving separate filter by user Success Response Get a List of all Reports Example Response { "sql": "2IE5D+eS9WecyXoIHN7GaFnkzs5h6KLxlFJj99Adyif2Ccb63kRXs3EFTTHd1jhfbn2ruW+9J9SFAOk/ZRyxYFmmBJFJfiHrt6FyudyN6sMedaT3CRoU1x9XspuXc0UIrlPQRb7XXhqWzLK0MEntAXzpNuR40mS0J+AnsAMG1DpoaGGjCm875uKwI9ixYT++1YQeVUNqmV+8AyA5nvbreKyITzfda/bQiXnpcTu3E0SSqoCSJz+kmvpMu6YXr/+IIQAwFm7mhYCiNLUTKWvJ83gON/MHVcRVdBDo0z7tNIE+PdZABk5yOgP2+ywwlX7JsR78eqQhHiNec8vmNCyQPEMQd+nFQUlMl/XDAuSh287ArFwgtBIaDAOmMAvcjKso47yKNw75rmVcPpI7bgPlxkY24o8CTrCDcNp+b1viZCJMK7BUMm6TFFvw7yT7eP2KAkCV3w9pS3yoawhPDK6c+JPhfl1dzRCvdm+4js7KZHuX+JBVPavMjiBWrPVcX74HyTm3VZNQx6L9MW3tFDTu72bCI9z0v09Yoxvp/soAvaYsGOlPhLDHAGoxXXh11UalKl0MtoyQjltpokuCVSeLE9pHD1nFL662Lw1C44lNE47i5Jo9eL0FPqmVoRdTk27JEuP67z0WlJdzvf6aOwDzQg==", "connectKey": "ReportDemo", "reportId": 13102 } Response Notes Sql returned is encrypted.
GET /DeleteReport
Query Parameters (in addition to standard parameters)
reportId - Report Id to delete
Success Response
Delete specified Report
Example Response
{
"success": true
}
GET /GetScheduledReports Query Parameters (in addition to standard parameters) None Success Response Get all Scheduled Reports saved in the system Example Response[
{ "Id": 1,
"Name": "Order Details",
"Description": "Order Details",
"DataConnectName": "ReportDemo",
"ClientId": "1",
"Schedules": [
{
"Id": 1,
"Schedule": "* * * *",
"EmailTo": "",
"Format": "",
"LastRun": "1/1/2020 9:00 AM",
"UserId": ""
},
]
}
]
GET /RunScheduledReports Query Parameters (in addition to standard parameters) reportId - Id of the report to run scheduleId - Id of the schedule to run localRunTime - Local time required to compare and run report correctly clientId - Client Id to apply for multitenant dataFilters - Data filters can be passed as a serialized string to apply when building the query Success Response Process and run Scheduled Report provided Example Response{ "ReportId": 1,
"ReportName": "Order Details",
"ReportDescription": "Order Details",
"ReportSql": "EncryptedSql",
"ConnectKey": "Key",
}