Reports Overview
#
The Reports resource provides the ability to query and run reports configured in the referenced workspace.
/{VERSION}/workspaces/{WORKSPACE_ID}/reports
Available Interfaces
#
| Interface |
Description |
| Get All |
Returns a collection of configured reports. |
| Post Request |
Posts a request to run the report. |
| Get Status |
Queries the status of the supplied request. |
| Get Results |
Queries the result data of the supplied request. |
Schemas
#
Reports
#
| Key |
Description |
Type |
| id |
Unique identifier for referencing this report |
GUID |
| name |
User friendly name for the report instance |
string |
Report Status
#
| Data |
Description |
Type |
| dateCreated |
Timestamp of request's creation date |
DateTime |
| tenantId |
Customer tenant id of the request |
GUID |
| requestId |
Unique id for the request. |
GUID |
| reportId |
Unique id for the report instance. |
GUID |
| status |
Enum of the report request's status |
string |
| statusMessage |
Expanded message for the status |
string |
| reportTemplateName |
Template name for the reportId. Each template type contains different call information. (e.g. lists, summaries etc) |
string |
| rowLimitExceeded |
Bool value indicating whether the report output is truncated based on the configured row limit. |
bool |
Report Results
#
| Request |
Description |
Type |
| requestId |
Unique id for the request. |
GUID |
| tenantId |
Customer tenant id of the request |
GUID |
| request |
Request object contain details about the report, including information on fields returned, sorting and applied filters. |
Request Object |
| queryDuration |
Time taken to extract data for the request in milliseconds. |
int |
| totalDuration |
Time taken to execute the request in milliseconds. |
string |
| queryCount |
Number of records processed for the report |
int |
| totalCount |
Number of records returned in the report |
string |
| rowLimitExceeded |
Bool value indicating whether the report output is truncated based on the configured row limit |
string |
| data |
An array of data rows which contains the result of the report. Use the displayFields information in the Request object to identify the details of the returned data. Note: If particular field referenced in 'displayFields' does not exist in data row, it is empty (string) or false (bool). |
Array |
| summary |
If applicable, this contains summary row data for each row in the data array. |
Array |
Request Object
#
| Request |
Description |
Type |
| requestId |
Unique id for the request. |
GUID |
| dateCreated |
Timestamp of request's creation date |
DateTime |
| tenantId |
Customer tenant id of the request |
GUID |
| reportId |
Unique id for the report instance. |
GUID |
| reportTemplateName |
Template name for the reportId. Each template type contains different call information. (e.g. lists, summaries etc) |
string |
| filterConditions |
Details of the filter applied to the report |
Object |
| sortFields |
Array of sort orders applied to 1 or more fields. |
Array (Sort Order) |
| displayFields |
Array of fields that are returned for each row in the report |
Array (Display Field) |
| childDisplayFields |
Array of child fields that are returned for each row in the report (if applicable) |
string |
| metaData |
Other information regarding the returned report |
Object |
Sort Order Object
#
| Request |
Description |
Type |
| fieldName |
Id name for the field |
string |
| direction |
Enum for the sort order applied to this field |
Sort Order |
Display Field Object
#
| Request |
Description |
Type |
| fieldName |
Id name for the field |
string |
| mandatory |
Bool value indicating if the field is mandatory for the report |
bool |
Enums
#
Status
#
| Value |
Description |
| Starting |
Initializing the query |
| Counting |
Counting applicable data rows |
| Querying |
Query applicable data for the database |
| Processed |
Processing the report data. |
| Sorting |
Sorting the report data. |
| Totaling |
Populating total fields |
| TotalingPercent |
Populating % total fields |
| Converting |
Converting return dataset |
| Complete |
Completed |
Preset Date Filters
#
| Value |
Description |
| Today |
Data from today up until 15 mins before the report is run |
| Yesterday |
Data from the previous day. |
| ThisWeek |
Data from the current week. |
| LastWeek |
Data from the previous week. |
| ThisMonth |
Data from the current month. |
| LastMonth |
Data from the previous month. |
| ThisQuarter |
Data from the current quarter |
Sort Order
#
| Value |
Description |
| Ascending |
1 |
| Descending |
2 |
Additional Filters
#
Operators
#
| Value |
Description |
Applies to |
| = |
Equals |
All data types |
| != |
Doesn't equal |
All data types |
| > |
Greater than |
Double, Datetime |
| >= |
Greater than or equals |
Double, Datetime |
| < |
Less than |
Double, Datetime |
| <= |
Less than or equals |
Double, Datetime |
| sw |
Starts with. |
String |
| nsw |
Doesn't start with. |
String |
| ct |
Contains. |
String |
| nct |
Doesn't contain |
String |
| ew |
Ends with |
String |
| new |
Doesn't end with |
String |
Examples
#
Example - Call Direction = Incoming
#
{
"reportId": "00000000-0000-0000-0000-000000000001",
"dateFilter": {
"presetName": "ThisQuarter"
},
"additionalConditions" : \[{
"fieldName" : "callDir",
"operator" : "=",
"values" : ["2"][ "2" ]
}]
}
Example - Direct Inward Dial = '(123) 456 7890'
#
{
"reportId": "00000000-0000-0000-0000-000000000001",
"dateFilter": {
"presetName": "ThisQuarter"
},
"additionalConditions" : \[{
"fieldName" : "ddi",
"operator" : "=",
"values" : ["+11234567890"][ "+11234567890" ]
}]
}
Example - Direct Inward Dial Starts With '123'
#
{
"reportId": "00000000-0000-0000-0000-000000000001",
"dateFilter": {
"presetName": "ThisQuarter"
},
"additionalConditions" : \[{
"fieldName" : "ddi",
"operator" : "=",
"values" : ["+1123"][ "+1123" ]
}]
}
Example - User numbers 1002 and 1002
#
{
"reportId": "00000000-0000-0000-0000-000000000001",
"dateFilter": {
"presetName": "ThisQuarter"
},
"additionalConditions" : \[{
"fieldName" : "userNum",
"operator" : "=",
"values" : ["1001", "1002"][ "1001", "1002" ]
}]
}