Thresholds Statistics
API Explorer: /masters/{masterId}/reports/{reportId}
To get statistics for test failure criteria you set, use the masterId and the /masters/{masterId}/reports/thresholds endpoint. You will find all the details of which criteria you set passed or failed and where (if any) those violations occurred.
The reportId mentioned in the API explorer is thresholds for this case.
The sample code returns threshold statistics for items with a masterId of 12345678. Use the actual masterId in place of 12345678. Also, to find out which labelId goes with a specific label, you will need to use the APIs in either the High Level Masters Overview or Request Statistics sections.
To narrow down the data you want to look at, visit the advanced settings for the details on how to narrow down your data by scenario, location, or a specific time range.
Get Threshold Statistics
curl 'https://a.blazemeter.com/api/v4/masters/12345678/reports/thresholds' \
--user 'api_key_id:api_key_secret'
Threshold Statistics Response Attributes
Attributes
-
hashstringread-only
Is always
thresholds -
namestringread-only
Is always
Thresholds -
typestringread-only
Is always
Thresholds -
sourcestringread-only
Is always
Thresholds -
idstringread-only
Is always
thresholds -
master_idintegerread-only
The
masterIdof the report -
dataUrlstringread-only
The URL for the API that shows the KPI values for the data in the data attribute
-
dataarrayread-only
List of a data details regarding the various failure criteria set for this test run
Show/Hide Child Attributes
-
idstringread-only
The identifier of a failure criteria/threshold
-
fieldstringread-only
The KPI being checked (i.e. Response time of 90th percentile)
-
ignoreRampupTimeintegerread-only
If the "Ignore Rampup Time" option is turned on, this value will match the ramp-up time of the test in seconds
-
labelIdstringread-only
This will be the
labelIdof the label being checked -
opstringread-only
The comparator of this criteria. Includes:
eq(equal),gt(greater than),lt(less than),ne(not equal) -
rangeintegerread-only
This will be
-1if the "1-minute sliding window" is turned off. If "sliding window" is turned on, this will be60 -
stopTestOnViolationbooleanread-only
Denotes whether the test will stop upon violation of this criteria
-
successbooleanread-only
Denotes whether the failure criteria passed or failed
-
thresholdintegerread-only
The threshold value that triggers a failure
-
createdintegerread-only
The time the criteria was created. Denoted in UNIX Epoch Time
-
updatedintegerread-only
The time the criteria was updated. Denoted in UNIX Epoch Time
-
masterIdintegerread-only
The
masterIdof the test run -
testIdintegerread-only
The
testIdof the test run -
violationsarrayread-only
List of violation details for this label
Show/Hide Child Attributes
-
fromintegerread-only
Start time of the 1 minute window where a violation occurred. Denoted in UNIX Epoch Time
-
tointegerread-only
End time of the 1 minute windo where a violation occurred. Denoted in UNIX Epoch Time
-
valueintegerread-only
The value that was measured (i.e. 90th percentile response time in ms)
-
-
Response200 OK
{
"api_version": 4,
"error": null,
"result": {
"hash": "thresholds",
"name": "Thresholds",
"type": "Thresholds",
"source": "Thresholds",
"id": "thresholds",
"master_id": 12345678,
"dataUrl": "https://a.blazemeter.com/api/latest/masters/12345678/reports/thresholds/data",
"data": [
{
"id": "5ceda469b72dc531292b8804",
"field": "responseTime.percentile.90",
"ignoreRampupTime": 60,
"labelId": "aa66bf0097386e72c10315745ffed811ae2707b6d48b2fd05df9510615c71158",
"op": "gt",
"range": 60,
"stopTestOnViolation": false,
"success": true,
"threshold": 500,
"created": 1559077993,
"updated": 1559077993,
"masterId": 12345678,
"testId": 1234567,
"violations": []
},
{
"id": "5ceda469b72dc531292b8805",
"field": "responseTime.percentile.90",
"ignoreRampupTime": 60,
"labelId": "f5d6402c5aacbfa32134a0ad31fcc6de5300a9b3966264350bd462b19305ecbb",
"op": "gt",
"range": 60,
"stopTestOnViolation": false,
"success": false,
"threshold": 1000,
"created": 1559077993,
"updated": 1559078296,
"masterId": 12345678,
"testId": 1234567,
"violations": [
{
"from": 1559079012,
"to": 1559079072,
"value": 1967
},
{
"from": 1559079002,
"to": 1559079062,
"value": 1967
},
{
"from": 1559078992,
"to": 1559079052,
"value": 1967
},
{
"from": 1559078982,
"to": 1559079042,
"value": 1959
},
{
"from": 1559078982,
"to": 1559079042,
"value": 1959
},
{
"from": 1559078972,
"to": 1559079032,
"value": 1959
}
]
},
{
"id": "5ceda469b72dc531292b8806",
"field": "responseTime.percentile.90",
"ignoreRampupTime": 60,
"labelId": "883ced7ab4e8aecee91719becdbdb09916b34dcc1a5ba78a1c3453d4a2eb3006",
"op": "gt",
"range": 60,
"stopTestOnViolation": false,
"success": false,
"threshold": 4500,
"created": 1559077993,
"updated": 1559078296,
"masterId": 12345678,
"testId": 1234567,
"violations": [
{
"from": 1559079012,
"to": 1559079072,
"value": 4959
},
{
"from": 1559079002,
"to": 1559079062,
"value": 4959
},
{
"from": 1559078993,
"to": 1559079050,
"value": 4959
},
{
"from": 1559078983,
"to": 1559079041,
"value": 4959
},
{
"from": 1559078983,
"to": 1559079041,
"value": 4959
}
]
},
{
"id": "5ceda469b72dc531292b8807",
"field": "responseTime.percentile.90",
"ignoreRampupTime": 60,
"labelId": "9ed35d26cbb13b431002a72d1614138bbf2ec35afa0c834f82f2898372ed3b33",
"op": "gt",
"range": 60,
"stopTestOnViolation": false,
"success": false,
"threshold": 1000,
"created": 1559077993,
"updated": 1559078296,
"masterId": 12345678,
"testId": 1234567,
"violations": [
{
"from": 1559079013,
"to": 1559079072,
"value": 1095
},
{
"from": 1559079003,
"to": 1559079062,
"value": 1095
},
{
"from": 1559078993,
"to": 1559079052,
"value": 1095
},
{
"from": 1559078983,
"to": 1559079042,
"value": 1095
},
{
"from": 1559078983,
"to": 1559079042,
"value": 1095
},
{
"from": 1559078972,
"to": 1559079030,
"value": 1087
},
{
"from": 1559078962,
"to": 1559079022,
"value": 1087
},
{
"from": 1559078952,
"to": 1559079011,
"value": 1087
}
]
}
]
},
"request_id": "5ceda99113e15"
}