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.
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.
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
-
hash
stringread-only
Is always
thresholds
-
name
stringread-only
Is always
Thresholds
-
type
stringread-only
Is always
Thresholds
-
source
stringread-only
Is always
Thresholds
-
id
stringread-only
Is always
thresholds
-
master_id
integerread-only
The
masterId
of the report -
dataUrl
stringread-only
The URL for the API that shows the KPI values for the data in the data attribute
-
data
arrayread-only
List of a data details regarding the various failure criteria set for this test run
Show/Hide Child Attributes-
id
stringread-only
The identifier of a failure criteria/threshold
-
field
stringread-only
The KPI being checked (i.e. Response time of 90th percentile)
-
ignoreRampupTime
integerread-only
If the "Ignore Rampup Time" option is turned on, this value will match the ramp-up time of the test in seconds
-
labelId
stringread-only
This will be the
labelId
of the label being checked -
op
stringread-only
The comparator of this criteria. Includes:
eq
(equal),gt
(greater than),lt
(less than),ne
(not equal) -
range
integerread-only
This will be
-1
if the "1-minute sliding window" is turned off. If "sliding window" is turned on, this will be60
-
stopTestOnViolation
booleanread-only
Denotes whether the test will stop upon violation of this criteria
-
success
booleanread-only
Denotes whether the failure criteria passed or failed
-
threshold
integerread-only
The threshold value that triggers a failure
-
created
integerread-only
The time the criteria was created. Denoted in UNIX Epoch Time
-
updated
integerread-only
The time the criteria was updated. Denoted in UNIX Epoch Time
-
masterId
integerread-only
The
masterId
of the test run -
testId
integerread-only
The
testId
of the test run -
violations
arrayread-only
List of violation details for this label
Show/Hide Child Attributes-
from
integerread-only
Start time of the 1 minute window where a violation occurred. Denoted in UNIX Epoch Time
-
to
integerread-only
End time of the 1 minute windo where a violation occurred. Denoted in UNIX Epoch Time
-
value
integerread-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"
}