Logo
Akamai APIs API Documentation

Get error statistics

POST https://{{host}}/edge-diagnostics/v1/estats

Returns HTTP status codes distribution statistics from delivering a URL or CP code based on the nine-second traffic sample from the last two minutes. You can filter the results by delivery and errorType. The delivery is the delivery type of your resource, either ENHANCED_TLS or STANDARD_TLS. The STANDARD_TLS value returns data for the HTTP traffic with Standard TLS hostname, whereas ENHANCED_TLS for the HTTPS traffic with Enhanced TLS hostname. Without this filter, Edge Diagnostics checks on its own the type of delivery used by your resource and returns data for it. If your resource uses both delivery types, then Edge Diagnostics returns data for the type which got all data collected faster. If you choose the delivery type not used by your resource, then the results are empty. If you want to add this filter, you can run the Get an edge hostname operation in Edge Hostnames API to confirm the delivery type of your resource. It's the securityType value. The errorType filter is for the traffic's direction. The EDGE_ERRORS value returns data for the traffic between a customer and an edge server and ORIGIN_ERRORS between the edge server and the origin. Without this filter, Edge Diagnostics returns data for both directions.

 

Body PARAM

Key Datatype Required Description 
accountSwitchKey
string (Optional) For customers who manage more than one account, this [runs the operation from another account](https://techdocs.akamai.com/developer/docs/manage-many-accounts-with-one-api-client). The Identity and Access Management API provides a [list of available account switch keys](https://techdocs.akamai.com/iam-api/reference/get-client-account-switch-keys).



HEADERS

Key Datatype Required Description 
Content-Type
string
Accept
string




RESPONSES

status OK

{ "completedTime": "2021-02-26T07:15:49Z", "createdBy": "szhang", "createdTime": "2021-02-26T07:15:42Z", "executionStatus": "SUCCESS", "request": { "delivery": "ENHANCED_TLS", "url": "https://www.example.com" }, "result": { "edgeErrors": 1460, "edgeFailurePercentage": 2, "edgeHits": 79655, "edgeStatusCodeDistribution": [ { "hits": 72804, "httpStatus": 200, "percentage": 91.4 }, { "hits": 2442, "httpStatus": 204, "percentage": 3.07 } ], "originErrors": 1204, "originFailurePercentage": 1, "originHits": 82279, "originStatusCodeDistribution": [ { "hits": 76513, "httpStatus": 200, "percentage": 92.99 }, { "hits": 2402, "httpStatus": 204, "percentage": 2.92 } ], "topEdgeIpsWithError": [ { "edgeIp": "NN.NN.NN.NN", "edgeIpLocation": { "asNumber": 1234, "city": "TOKYO", "countryCode": "JP", "regionCode": "13" }, "edgeLogsLink": "/edge-diagnostics/v1/grep?edgeIp=NN.NN.NN.NN&cpCode=1234567&objectStatus=p&httpStatusCode=403&end=2021-04-21T13:42:45Z&logType=f", "errorCode": "0:None", "hits": 26, "httpStatus": 403, "objectStatus": [ { "code": "p", "description": "Another hierarchy parent edge server was contacted." } ] }, { "edgeIp": "NN.NN.NN.NN", "edgeIpLocation": { "asNumber": 1234, "city": "TOKYO", "countryCode": "JP", "regionCode": "13" }, "edgeLogsLink": "/edge-diagnostics/v1/grep?edgeIp=NN.NN.NN.NN&cpCode=1234567&objectStatus=p&httpStatusCode=403&end=2021-04-21T13:42:45Z&logType=f", "errorCode": "18:ACCESS_DENIED", "hits": 22, "httpStatus": 403, "objectStatus": [ { "code": "p", "description": "Another hierarchy parent edge server was contacted." } ] } ], "topEdgeIpsWithErrorFromOrigin": [ { "edgeIp": "NN.NN.NN.NN", "edgeIpLocation": { "asNumber": 1234, "city": "TOKYO", "countryCode": "JP", "regionCode": "13" }, "edgeLogsLink": "/edge-diagnostics/v1/grep?edgeIp=NN.NN.NN.NN&cpCode=1234567&objectStatus=p&httpStatusCode=403&end=2021-04-21T13:42:45Z&logType=r", "errorCode": "0:None", "hits": 31, "httpStatus": 403, "objectStatus": [ { "code": "p", "description": "Another hierarchy parent edge server was contacted." } ] }, { "edgeIp": "NN.NN.NN.NN", "edgeIpLocation": { "asNumber": 1234, "city": "TOKYO", "countryCode": "JP", "regionCode": "13" }, "edgeLogsLink": "/edge-diagnostics/v1/grep?edgeIp=NN.NN.NN.NN&cpCode=1234567&objectStatus=p&httpStatusCode=403&end=2021-04-21T13:42:45Z&logType=r", "errorCode": "0:None", "hits": 29, "httpStatus": 403, "objectStatus": [ { "code": "p", "description": "Another hierarchy parent edge server was contacted." } ] } ], "topEdgeIpsWithSuccess": [ { "edgeIp": "NN.NN.NN.NN", "edgeIpLocation": { "asNumber": 1234, "city": "TOKYO", "countryCode": "JP", "regionCode": "13" }, "errorCode": "0:None", "hits": 1194, "httpStatus": 200, "objectStatus": [ { "code": "p", "description": "Another hierarchy parent edge server was contacted." } ] }, { "edgeIp": "NN.NN.NN.NN", "edgeIpLocation": { "asNumber": 1234, "city": "TOKYO", "countryCode": "JP", "regionCode": "13" }, "errorCode": "0:None", "hits": 798, "httpStatus": 200, "objectStatus": [ { "code": "p", "description": "Another hierarchy parent edge server was contacted." } ] } ], "topEdgeIpsWithSuccessFromOrigin": [ { "edgeIp": "NN.NN.NN.NN", "edgeIpLocation": { "asNumber": 1234, "city": "TOKYO", "countryCode": "JP", "regionCode": "13" }, "errorCode": "0:None", "hits": 1765, "httpStatus": 200, "objectStatus": [ { "code": "p", "description": "Another hierarchy parent edge server was contacted." } ] }, { "edgeIp": "NN.NN.NN.NN", "edgeIpLocation": { "asNumber": 1234, "city": "TOKYO", "countryCode": "JP", "regionCode": "13" }, "errorCode": "0:None", "hits": 1525, "httpStatus": 200, "objectStatus": [ { "code": "p", "description": "Another hierarchy parent edge server was contacted." } ] } ] } }



Curl
curl -X POST 'https://undefined/edge-diagnostics/v1/estats?accountSwitchKey=' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"delivery":"ENHANCED_TLS","errorType":"EDGE_ERRORS","url":"https://www.example.com"}'

ENDPOINTS