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.

Request Params

KeyDatatypeRequiredDescription
accountSwitchKeystring(Optional) For customers who manage more than one account, this runs the operation from another account. The Identity and Access Management API provides a list of available account switch keys.

Request Body

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

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{"allIncludedPages":[{"enumeratedSource":["//1   \u003cdiv class=\"test-class1\" id=\"test1\"\u003e","//2   \u003cesi:assign name=\"versionPath\" value=\"version\"/\u003e","//3   \u003cdiv\u003eIncluded Page 1\u003c/div\u003e  "],"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   \u003cdiv class=\"test-class1\" id=\"test1\"\u003e","//2   \u003cesi:assign name=\"versionPath\" value=\"version\"/\u003e","//3   \u003cdiv\u003eIncluded Page 2\u003c/div\u003e"],"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    \u003c!DOCTYPE html\u003e\u003chtml class=\"no-js\"\u003e","//3    \u003chead\u003e","//4    \u003cmeta charset=\"utf-8\"\u003e","//5   \u003cesi:choose\u003e","//6   \u003cesi:when test=\"$len($(HTTP_HOST{0}))\u003e1\"\u003e","//21   \u003cesi:assign name=\"currenthost\" value=\"$(HTTP_HOST{0})\"/\u003e","//22   \u003c/esi:when\u003e","//23   \u003cesi:otherwise\u003e","//24   \u003cesi:assign name=\"currenthost\" value=\"$(HTTP_HOST)\"/\u003e","//25   \u003c/esi:otherwise\u003e","//26   \u003c/esi:choose\u003e","//27   \u003cesi:choose\u003e","//28   \u003cesi:when test=\"$substr( $(currenthost), 0, $index($(currenthost), '.')) == inactive\"\u003e","//29   \u003cesi:assign name=\"versionPath\" value=\"inactiveversion\"/\u003e","//30   \u003c/esi:when\u003e","//31   \u003cesi:when test=\"$substr( $(currenthost), 0, $index($(currenthost), '.')) == deploy\"\u003e","//32   \u003cesi:assign name=\"versionPath\" value=\"inactiveversion\"/\u003e","//33   \u003c/esi:when\u003e","//34   \u003cesi:otherwise\u003e","//35   \u003cesi:assign name=\"versionPath\" value=\"version\"/\u003e","//36   \u003c/esi:otherwise\u003e","//37   \u003c/esi:choose\u003e","//38   \u003c!-- ESI cdn script include for www --\u003e","//39   \u003cscript type=\"text/javascript\" src='\u003cesi:include src=\"http://www.exampleinclude.com\"\u003e\u003c/esi:include\u003e/clientlibs/abc.min.js'\u003e\u003c/script\u003e"],"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":[]}}