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.

The 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.

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.

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

  • labelIdstring

    read-only

    The labelId of the label

  • errorsarray

    read-only

    List of error details found for this label

  • assertionsarray

    read-only

    List of assertion details found for this label

  • failedEmbeddedResourcesarray

    read-only

    List of failed embedded resources details for this lable

  • urlsarray

    read-only

    List of url details for this label

  • namestring

    read-only

    Name of label that generated the errors

  • _idstring

    read-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"
}