Skip to content

Overview Of The Tenon Test API Response

Upon submission of your request against the Test API, we will return a JSON formatted response for your client application to consume. This response will include a large amount of detail useful to you in determining the quality of your request and will detail the test results generated based on that request.

This document explains everything in the JSON response.

  • status: HTTP status code from the Test API. Values will be 200, 400, 401, 402, 403, 404, 405, 500, or 522
  • message: A specific text message indicating the nature of the response
  • documentSize: Size, in bytes of the document you gave us to test
  • responseExecTime: How long, in seconds, it took for us to test your document
  • responseTime: Time of your request, localized to GMT
  • sourceHash: An MD5 hash of your document source, useful in uniquely identifying your tested documents
  • urlHttpCode: The HTTP status code that your page sent back
  • resultUrl: (If "store" was set to "1" in your request) a URL at which you can view the test results on the Tenon website
  • request: This object is a complete mirror of the request you sent to us. Any values echoed here which you did not supply in your request will be set to their defaults, as discussed in "Understanding Tenon API Request Parameters"
    • certainty
    • docID
    • importance
    • key
    • level
    • priority
    • priorityWeightissueLocation
    • ref
    • responseID
    • projectID
    • uaString
    • url
    • viewport
      • height
      • width
    • fragment
    • store
  • clientScriptErrors: this object will generate an array of errors generated by the script(s) in your tested document. These errors may impact our ability to effectively test your document, so we list them here so you can fix them and retest. Each error contains the following information:
    • message: The exception message
    • stacktrace: This is a full stack trace of the error
      • file: the file where the error exists
      • line: the line where the error exists
      • function: the function where the error exist
  • globalStats: The global stats object exists to allow you to compare your document against others that have been tested. Global Stats are a calculation of all tested documents. These stats relate only to "density" - that is, per KB of code, what percentage contain accessibility issues.
    • allDensity: Density, as a percentage, of both errors and warnings
    • errorDensity: Density, as a percentage, of errors only
    • warningDensity: Density, as a percentage, of warnings only
  • resultSummary: The resultSummary object provides a high level overview of our test results.
    • density: As mentioned above in 'globalStats' the density is a calculation of the issue density in your tested document
      • allDensity
      • errorDensity
      • warningDensity
    • issues: This is a count of the issues in your document
      • totalErrors
      • totalIssues
      • totalWarnings
    • issuesByLevel: This is a count of the issues in your document, separated out by WCAG Level.
      • A
        • count
        • pct
      • AA
        • count
        • pct
      • AAA
        • count
        • pct
    • tests: this is a count of how many tests Tenon API ran (total), how many passed and how many failed:
      • failing
      • passing
      • total
  • resultSet: The resultSet will contain an array for each issue discovered during testing. Each issue will be presented with the following keys. Each of these are described in full in the document titled Understanding Issue Reports in Tenon.io API Response"
    • bpID
    • certainty
    • priority
    • errorDescription
    • errorSnippet
    • errorTitle
    • issueID
    • position
      • line
      • column
    • viewPortLocation
      • width
      • height
      • top-left
        • x
        • y
      • bottom-right
        • x
        • y
    • ref
    • resultTitle
    • signature
    • standards
    • tID
    • xpath
  • apiErrors: will list out any errors on the Tenon API itself. We hope that this object is always empty. However, if you do see anything here, we'd appreciate it if you'd pass on the following additional information in this section. It will include:
    • line
    • message
    • sourceId
    • tID
  • log: will list debug messages with reason why request failed

JSON Response Example

Here's an example of the JSON response: