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: Curl curl -X POST 'https://host/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 |