The Reporting API provides the ability to report on the results of tests run within your DataTrue account.
This can be used to:
The Reporting API requires an API key to be provided in the Authorization
header. The API key used to access the Reporting API can be found within
your User Profile.
Retrieve a report on the status of tests executed
The query for the test result summary data
account_id required | number DataTrue Account ID |
Array of objects Dimensions that the metrics are calculated for | |
Array of objects Metrics to report on | |
Array of objects Dimensions to filter the data by (clauses in this array are AND-ed together) | |
Array of objects Metrics to filter the data by (clauses in this array are AND-ed together) | |
object Report settings |
{- "account_id": 1,
- "dimensions": [
- {
- "name": "test_name"
}
], - "metrics": [
- {
- "name": "tag_validations_passed"
}, - {
- "name": "tag_validations"
}
], - "dimension_filter_clauses": [
- {
- "operator": "OR",
- "filters": [
- {
- "field": "suite_id",
- "exclude": false,
- "operator": "EQUALS",
- "value": 1
}, - {
- "field": "suite_id",
- "exclude": false,
- "operator": "EQUALS",
- "value": 2
}
]
}, - {
- "operator": "AND",
- "filters": [
- {
- "field": "start_time",
- "operator": "GREATER_THAN_OR_EQUALS",
- "value": "2020-01-01T00:00:00"
}, - {
- "field": "start_time",
- "operator": "LESS_THAN_OR_EQUALS",
- "value": "2020-01-31T23:59:59"
}
]
}
], - "settings": {
- "utc_offset": "+01:00",
- "page": 0,
- "page_length": 10,
- "sort": [
- {
- "field": "test_name",
- "direction": "ASC"
}
]
}
}
{- "rows": [
- {
- "test_name": "Test 1",
- "tag_validations_passed": 10,
- "tag_validations": 20
}, - {
- "test_name": "Test 2",
- "tag_validations_passed": 10,
- "tag_validations": 10
}
], - "meta": {
- "page": 0,
- "total_pages": 1
}
}
Retrieve a report on the status of Tag Validations
The query for the tag validation data
account_id required | number DataTrue Account ID |
Array of objects Dimensions that the metrics are calculated for | |
Array of objects Metrics to report on | |
Array of objects Dimensions to filter the data by (clauses in this array are AND-ed together) | |
Array of objects Metrics to filter the data by (clauses in this array are AND-ed together) | |
object Report settings |
{- "account_id": 1,
- "dimensions": [
- {
- "name": "test_name"
}, - {
- "name": "tag_validation_status"
}
], - "metrics": [
- {
- "name": "tag_validations_processed"
}
], - "dimension_filter_clauses": [
- {
- "operator": "OR",
- "filters": [
- {
- "field": "suite_id",
- "exclude": false,
- "operator": "EQUALS",
- "value": 1
}, - {
- "field": "suite_id",
- "exclude": false,
- "operator": "EQUALS",
- "value": 2
}
]
}, - {
- "operator": "AND",
- "filters": [
- {
- "field": "process_time",
- "operator": "GREATER_THAN_OR_EQUALS",
- "value": "2020-01-01T00:00:00"
}, - {
- "field": "process_time",
- "operator": "LESS_THAN_OR_EQUALS",
- "value": "2020-01-31T23:59:59"
}
]
}
], - "settings": {
- "utc_offset": "+01:00",
- "page": 0,
- "page_length": 10,
- "sort": [
- {
- "field": "test_name",
- "direction": "ASC"
}
]
}
}
{- "rows": [
- {
- "test_name": "Test 1",
- "tag_validation_status": "passed",
- "tag_validations_processed": 10
}, - {
- "test_name": "Test 1",
- "tag_validation_status": "failed",
- "tag_validations_processed": 20
}
], - "meta": {
- "page": 0,
- "total_pages": 1
}
}