Logo
Akamai APIs API Documentation

Get an ESI debugging report

POST https://{{host}}/edge-diagnostics/v1/esi-debugger-api/v1/debug

This operation provides a debugging report on the ESI code of your source page and all pages that the source page references.

 

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

{ "allIncludedPages": [ { "enumeratedSource": [ "//1 <div class=\"test-class1\" id=\"test1\">", "//2 <esi:assign name=\"versionPath\" value=\"version\"/>", "//3 <div>Included Page 1</div> " ], "environmentVariables": [ "versionPath: version", "currenthost: www.exampletest1.com" ], "evaluatedResults": [ "[2011]: The document contains no ESI tags.", "[2004]: Your code ran successfully." ], "pageLink": "www.example.com/content/test.html", "syntaxErrorMessages": [] }, { "enumeratedSource": [ "//1 <div class=\"test-class1\" id=\"test1\">", "//2 <esi:assign name=\"versionPath\" value=\"version\"/>", "//3 <div>Included Page 2</div>" ], "environmentVariables": [ "versionPath: version", "currenthost: www.exampletest2.com" ], "evaluatedResults": [ "[2011]: The document contains no ESI tags.", "[2004]: Your code ran successfully." ], "pageLink": "www.example.com/content/abc/esi.html", "syntaxErrorMessages": [] } ], "sourceDebugPage": { "enumeratedSource": [ "//1 ", "//2 <!DOCTYPE html><html class=\"no-js\">", "//3 <head>", "//4 <meta charset=\"utf-8\">", "//5 <esi:choose>", "//6 <esi:when test=\"$len($(HTTP_HOST{0}))>1\">", "//21 <esi:assign name=\"currenthost\" value=\"$(HTTP_HOST{0})\"/>", "//22 </esi:when>", "//23 <esi:otherwise>", "//24 <esi:assign name=\"currenthost\" value=\"$(HTTP_HOST)\"/>", "//25 </esi:otherwise>", "//26 </esi:choose>", "//27 <esi:choose>", "//28 <esi:when test=\"$substr( $(currenthost), 0, $index($(currenthost), '.')) == inactive\">", "//29 <esi:assign name=\"versionPath\" value=\"inactiveversion\"/>", "//30 </esi:when>", "//31 <esi:when test=\"$substr( $(currenthost), 0, $index($(currenthost), '.')) == deploy\">", "//32 <esi:assign name=\"versionPath\" value=\"inactiveversion\"/>", "//33 </esi:when>", "//34 <esi:otherwise>", "//35 <esi:assign name=\"versionPath\" value=\"version\"/>", "//36 </esi:otherwise>", "//37 </esi:choose>", "//38 <!-- ESI cdn script include for www -->", "//39 <script type=\"text/javascript\" src='<esi:include src=\"http://www.exampleinclude.com\"></esi:include>/clientlibs/abc.min.js'></script>" ], "environmentVariables": [ "versionPath: version", "currenthost: www.example.com", "HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8;", "HTTP_CONTENT_LENGTH: 14041", "HTTP_CONTENT_LOCATION:", "HTTP_CONTENT_TYPE: text/html; charset=UTF-8", "HTTP_HOST: www.example.com", "HTTP_REFERER:" ], "evaluatedResults": [ "[2004]: Your code ran successfully." ], "pageLink": "http://www.example.com/", "syntaxErrorMessages": [] } }



Curl
curl -X POST 'https://undefined/edge-diagnostics/v1/esi-debugger-api/v1/debug?accountSwitchKey=' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"clientIP":"192.0.2.0","clientRequestHeaders":{"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8;"},"originServer":"example.server","url":"https://www.example.com"}'

ENDPOINTS