Error Statistics
API Explorer: /masters/{masterId}/reports/{reportId}/data
To get statistics for HTTP errors and failed assertions, use the masterId
and the /masters/{masterId}/reports/errorsreport/data
endpoint. Aggregated statistics are kept for HTTP errors, failed assertions, and failed embedded resources (embedded resources that returned non-200). Errors are HTTP status codes other than 200; however, if a request with status code 200 is still being displayed as an error, visit the article "Why are my HTTP 200 OK counted as errors?" to find out why.
reportId
mentioned in the API explorer is errorsreport
for this case.The sample code returns statistics for items with a masterId
of 12345678
. Use the actual masterId
in place of 12345678
.
Error Statistics
curl 'https://a.blazemeter.com/api/v4/masters/12345678/reports/errorsreport/data' \
--user 'api_key_id:api_key_secret'
Error Statistics Response Attributes
Attributes
-
labelId
stringread-only
The
labelId
of the label -
errors
arrayread-only
List of error details found for this label
Show/Hide Child Attributes-
rc
stringread-only
Response code (can be an empty string)
-
m
stringread-only
Response message returned
-
count
integerread-only
Number of errors generated with this response code and message
-
-
assertions
arrayread-only
List of assertion details found for this label
Show/Hide Child Attributes-
name
stringread-only
Assertion name (from JMeter script)
-
failureMessage
stringread-only
Assertion failure message (from JMeter script)
-
failures
integerread-only
Number of failures generated with this assertion name and message
-
-
failedEmbeddedResources
arrayread-only
List of failed embedded resources details for this lable
Show/Hide Child Attributes-
rc
stringread-only
Response code (can be an empty string)
-
rm
stringread-only
Response message returned
-
count
integerread-only
Number of errors generated with this response code and message
-
-
urls
arrayread-only
List of url details for this label
Show/Hide Child Attributes-
url
stringread-only
URL that generated an error
-
count
integerread-only
Number of errors the URL generated an error
-
-
name
stringread-only
Name of label that generated the errors
-
_id
stringread-only
Name of label that generated the errors
Response200 OK
{
"api_version": 4,
"error": null,
"result": [
{
"labelId": "3b6d1bf098957debc57a9e6fc732460ebc922e77571812dda2edb21ea0c80492",
"errors": [],
"assertions": [],
"failedEmbeddedResources": [
{
"rc": "502",
"rm": "Bad Gateway",
"count": 1
}
],
"urls": [
{
"url": "https://unpkg.com/video.js/dist/video-js.css",
"count": 1
}
],
"name": "HTTP Request",
"_id": "HTTP Request"
},
{
"labelId": "945d56310dfa9763fee02e16874f50997d5e4ae6162e187e9ee80e50e6b7da15",
"errors": [],
"assertions": [
{
"name": "Response Assertion",
"failureMessage": "Response messaged did not contain \"Dummy\".",
"failures": 642
}
],
"failedEmbeddedResources": [],
"urls": [],
"name": "Dummy Sample Again",
"_id": "Dummy Sample Again"
},
{
"labelId": "b5c7aed7cd2a308523e7d2847b7815909e864b2fd9c4ea88b00d35adb2ecdfd7",
"errors": [
{
"rc": "401",
"m": "Unauthorized",
"count": 32
},
{
"rc": "500",
"m": "Internal Server Error",
"count": 644
},
{
"rc": "",
"m": "Number of samples in transaction : 3, number of failing samples : 1",
"count": 32
},
{
"rc": "401",
"m": "Number of samples in transaction : 3, number of failing samples : 1",
"count": 32
},
{
"rc": "404",
"m": "NOT FOUND",
"count": 643
}
],
"assertions": [
{
"name": "Response Assertion",
"failureMessage": "Response code did not contain a 200.",
"failures": 643
},
{
"name": "Response Assertion",
"failureMessage": "Response messaged did not contain \"Dummy\".",
"failures": 642
}
],
"failedEmbeddedResources": [
{
"rc": "502",
"rm": "Bad Gateway",
"count": 1
}
],
"urls": [
{
"url": "https://unpkg.com/video.js/dist/video-js.css",
"count": 1
}
],
"name": "ALL",
"_id": "ALL"
},
{
"labelId": "bf3c7ccb0a030c41fc714c6527397e95c1dc25cb4cb733d595c7a6b73f69b7b0",
"errors": [
{
"rc": "401",
"m": "Unauthorized",
"count": 32
}
],
"assertions": [],
"failedEmbeddedResources": [],
"urls": [],
"name": "Dummy Transaction 3",
"_id": "Dummy Transaction 3"
},
{
"labelId": "6cd7cac6b9903c94dbea09b9973066d5f36c6e1de2cd06c91c853afcd56faff5",
"errors": [
{
"rc": "500",
"m": "Internal Server Error",
"count": 644
},
{
"rc": "404",
"m": "NOT FOUND",
"count": 643
}
],
"assertions": [
{
"name": "Response Assertion",
"failureMessage": "Response code did not contain a 200.",
"failures": 643
}
],
"failedEmbeddedResources": [],
"urls": [],
"name": "Dummy Sample",
"_id": "Dummy Sample"
},
{
"labelId": "38e581ab346d07c61d6b397b4f9e8900702394fad1ea53cda48ef55406abd26",
"errors": [
{
"rc": "401",
"m": "Number of samples in transaction : 3, number of failing samples : 1",
"count": 32
}
],
"assertions": [],
"failedEmbeddedResources": [],
"urls": [],
"name": "Transaction Controller 2",
"_id": "Transaction Controller 2"
},
{
"labelId": "56c57ad0f920b342b61c12749fccc72d3840e6c9335f1e516ac9cf4a9ba51111",
"errors": [
{
"rc": "",
"m": "Number of samples in transaction : 3, number of failing samples : 1",
"count": 33
}
],
"assertions": [],
"failedEmbeddedResources": [],
"urls": [],
"name": "Transaction Controller",
"_id": "Transaction Controller"
}
],
"request_id": "5ced9f9fd4a6d"
}