GetCodeAnalysis

Run a one-off code analysis for an Acid Test for the specified client ID.

URLs:

Sandbox:

https://sandbox.emailonacid.com/v4/getCodeAnalysis - Default (XML) Request
https://sandbox.emailonacid.com/v4/getCodeAnalysis/xml - XML Request
https://sandbox.emailonacid.com/v4/getCodeAnalysis/json - JSON Request

Production:

https://api.emailonacid.com/v4/getCodeAnalysis - Default (XML) Request
https://api.emailonacid.com/v4/getCodeAnalysis/xml - XML Request
https://api.emailonacid.com/v4/getCodeAnalysis/json - JSON Request

Request:

XML

<?xml version="1.0" encoding="utf-8"?>
<get_code_analysis>
    <eoa_test_id>UNIQUE EMAIL TEST ID</eoa_test_id>
        <clients>
            <client_code>CLIENT CODE NUMBER</client_code>
        </clients>
</get_code_analysis>

JSON

{
    "eoa_test_id": UNIQUE EMAIL TEST ID,
    "clients"     : [
                        {
                            "client_code" : CLIENT CODE NUMBER
                        }
                    ]
}

JSON Validation Schema:

Click here to download.

Request Details

Element Description Data Type Required
eoa_test_id The reference id for the test to retrieve Integer Y
clients A mandatory container for client code Array Y
client_code A code as supplied from getClientLists() String Y

Response:

XML

<?xml version="1.0" encoding="utf-8"?>
<xml>
    <results>
        <client_results>
            <client_result>
                <client_code>9</client_code>
                <client_name>
                    <![CDATA[Entourage 2004]]>
                </client_name>
                <screen_shot/>
                <application>Application</application>
                <code_analysis>
                    <html_display>
                        <![CDATA[HTML DISPLAY OF ANALYSIS]]>
                    </html_display>
                    <severities>
                        <severity>
                            <name>Critical</name>
                            <discrepancy_count>9</discrepancy_count>
                            <discrepancies>
                                <discrepancy>
                                    <property>SELECTOR</property>
                                    <message>
                                        <![CDATA[:FOCUS is not supported.]]>
                                    </message>
                                    <lines>
                                        <![CDATA[151, 343]]>
                                    </lines>
                                </discrepancy>
                                <discrepancy>
                                    <property>SELECTOR</property>
                                    <message>
                                        <![CDATA[:HOVER is not supported.]]>
                                    </message>
                                    <lines>
                                        <![CDATA[156, 348]]>
                                    </lines>
                                </discrepancy>
                                ...
                            </discrepancies>
                        </severity>
                        <severity>
                            <name>Moderate</name>
                            <discrepancy_count>3</discrepancy_count>
                            <discrepancies>
                                <discrepancy>
                                    <property>CURSOR</property>
                                    <message>
                                        <![CDATA[CSS Property is not supported.]]>
                                    </message>
                                    <lines>
                                        <![CDATA[527, 676, 724]]>
                                    </lines>
                                </discrepancy>
                                ...
                            </discrepancies>
                        </severity>
                        <severity>
                            <name>Minor</name>
                            <discrepancy_count>25</discrepancy_count>
                            <discrepancies>
                                <discrepancy>
                                    <property>TITLE</property>
                                    <message>
                                        <![CDATA[TITLE attribute is not supported in IMG tags.]]>
                                    </message>
                                    <lines>
                                        <![CDATA[410, 501, 554, 583, 624, 655, 827]]>
                                    </lines>
                                </discrepancy>
                                <discrepancy>
                                    <property>ALT</property>
                                    <message>
                                        <![CDATA[ALT attribute is not supported in IMG tags.]]>
                                    </message>
                                    <lines>
                                        <![CDATA[410, 501, 554, 583, 624, 655, 827]]>
                                    </lines>
                                </discrepancy>
                                ...
                            </discrepancies>
                        </severity>
                    </severities>
                </code_analysis>
            </client_result>
        </client_results>
    </results>
</xml>

JSON

{
  "results": {
    "client_results": [
      {
        "client_result": {
          "client_code": "9",
          "client_name": "Entourage 2004",
          "screen_shot": "",
          "application": "Application",
          "code_analysis": {
            "html_display": "HTML DISPLAY OF ANALYSIS",
            "severities": [
              {
                "severity": {
                  "name": "Critical",
                  "discrepancy_count": "9",
                  "discrepancies": [
                    {
                      "discrepancy": {
                        "property": "SELECTOR",
                        "message": ":FOCUS is not supported.",
                        "lines": "151, 343"
                      }
                    },
                    {
                      "discrepancy": {
                        "property": "SELECTOR",
                        "message": ":HOVER is not supported.",
                        "lines": "156, 348"
                      }
                    },
                    {
                      "discrepancy": {
                        "property": "NAME",
                        "message": "NAME attribute is not supported in A tags.",
                        "lines": "498, 551, 579, 619, 651"
                      }
                    },
                    ...
                  ]
                }
              },
              {
                "severity": {
                  "name": "Moderate",
                  "discrepancy_count": "3",
                  "discrepancies": [
                    {
                      "discrepancy": {
                        "property": "CURSOR",
                        "message": "CSS Property is not supported.",
                        "lines": "527, 676, 724"
                      }
                    }
                  ]
                }
              },
              {
                "severity": {
                  "name": "Minor",
                  "discrepancy_count": "25",
                  "discrepancies": [
                    {
                      "discrepancy": {
                        "property": "TITLE",
                        "message": "TITLE attribute is not supported in IMG tags.",
                        "lines": "410, 501, 554, 583, 624, 655, 827"
                      }
                    },
                    {
                      "discrepancy": {
                        "property": "ALT",
                        "message": "ALT attribute is not supported in IMG tags.",
                        "lines": "410, 501, 554, 583, 624, 655, 827"
                      }
                    },
                    {
                      "discrepancy": {
                        "property": "TITLE",
                        "message": "TITLE attribute is not supported in AREA tags.",
                        "lines": "845, 847, 849, 854"
                      }
                    },
                    {
                      "discrepancy": {
                        "property": "ALT",
                        "message": "ALT attribute is not supported in AREA tags.",
                        "lines": "845, 847, 849, 854, 856, 858, 860"
                      }
                    },
                    ...
                  ]
                }
              }
            ]
          }
        }
      }
    ]
  }
}

Response Details

Element Description
client_code Our unique identifier for the email client. This code can be used in the CreateTest API call.
client_name Name of the email client.
screen_shot If we offer this client as a screen-shot this value will be TRUE, otherwise it will be FALSE.
application The email client application type. Value will be one of the following: desktop, mobile or web
code_analysis A break down analysis of the html for the Acidtest.
html_display The HTML for the code analysis breakdown display.
severity Breaks down a problem that code analysis found based on how severe they are (Critical, Moderate, and Minor).
disrepancy Holds specific information about what kind of problem was found and what line(s) the problem was found on.