Using the API
Introduction
Using the axe Monitor 6.2 Application Programming Interface (API) involves getting started by installing a RESTful web services browser extension and using it to connect with axe Monitor. After the connection is established, requests can be made from the extension to return response data from axe Monitor. These requests can pertain to projects, scripts, scope definitions, issues and rules.
As a Deque axe Monitor licensee, you can then use that data as you see fit (provided it is in accordance with the signed Subscription License Agreement between your organization and Deque executed upon your purchase of the axe Monitor product).
Quicklinks
On this page:
- Prerequisites
- Working with Organizations and Projects
- Retrieving organization names for a user
- Retrieving organization project names for a user
- Retrieving an organization project summary report for a user
- Downloading organization rules for a user
- Downloading public project rules for a user
- Downloading organization project issues for a user
- Retrieving a list of organizations and organization projects for a user by custom attribute
- Deleting organization project pages for a user
- Retrieving organization project analyzed pages for a user
- Retrieve a project or page group's dashboard data
- Retrieve a project list by a custom attribute name/value pair
- Working with Custom Rules
- Adding a new custom rule to axe Monitor through REST API
- Create a custom rule set for a given organization
- Update a custom rule set with a given id
- Delete a custom rule set with a given id
- Retrieve the details of a custom ruleset for a axe Monitor organization using REST API
- Retrieve a list of custom and default rulesets for an organization as part of project details API
- Retrieve a list of custom and default rulesets for an organization from the project resources API
- Retrieve a list of custom rule sets for a given organization
- Retrieve the details of a custom rule set for a given id
- List of Other Available Miscellaneous API Calls with Endpoints
Overview
The axe Monitor v.6.2 Web Service REST API lets you integrate any application with axe Monitor. Parameters are sent in JavaScript Object Notation (JSON) format, and results are also returned in JSON format. All APIs are handled in the context of a signed-in user's permissions. For example, if the signed-in user has been granted Member access to Projects A and B, and Administrator access to Project C, those permissions are used by the APIs to calculate the allowed actions. All requests are made to the Core server URL in a axe Monitor deployment.
Caution must be used to not make API requests at a rate that will impact the overall performance of the system. Certain requests can take a long time to execute, especially when they involve a large amount of data records in the system.
Notes
It is important to keep in mind the following notes:
- The full URL must include the
“/worldspace”
entry as the first in the command sequence. For example, if the request is“/organizationprojects”
and the DNS name to the server is“myworldspace.deque.com”
, then the full URL would be:“http://myworldspace.deque.com/worldspace/organizationprojects”
. - All requests and parameters are case sensitive.
- A login request must be made before any other request.
- The HTTP header
“Content-Type”
should be set to“application/json”
for all requests. - All APIs will return an HTTP 200 result code if the server processed the request. The response JSON object must be parsed to determine if the API was successful.
- If an REST API is called without the authentication call being performed first, an HTML error page will be returned instead of a JSON result object.
- Some API calls can take more than 60 seconds to execute, depending on the parameters, the load on the server and other factors, so an appropriate timeout should be set.
- All parameter names must be enclosed in quotes.
- All strings parameter values must be enclosed in quotes.
- All strings must be URL encoded.
Prerequisites
To use the REST API, you must first authenticate to the server. You will need the URL of the axe Monitor server (WORLDSPACE_URL) you are connecting to. You must also have a valid Email Address and Password to communicate with the axe Monitor server.
Further Reading: For additional, detailed information about the REST protocol, see Representational State Transfer - WikipediA.
Getting Started with an API Debugging Extension
For demonstration purposes, the screen shots in this section use the Mozilla Firefox browser with a REST client add-on extension. The examples show the use of RESTClient, version 3.0.4, which is compatible with Firefox v.57 or later. The extension is a debugger for RESTful web services that allows you to construct custom HTTP requests (via resources URI + HTTP request body method) to directly test requests (API calls) against an axe Monitor server.
Step 1: Install the RESTClient extension in the Firefox browser.
-
Launch Firefox and browse to https://addons.mozilla.org/en-US/firefox/addon/restclient.
-
Within the RESTClient Extension section, click the +Add to Firefox button.
An add-on management dialog box drops down from the Address field that lists the required permissions of the RESTClient.
-
Click the Add button to confirm addition of the RESTClient extension and your understanding of its required permissions.
The add-on management drop-down window refreshes to display a message to confirm the RESTClient extension was added successfully.
-
Click the OK button to dismiss the installation success message.
The add-on management drop-down dialog box closes.
Note
After successful addition of the extension to the browser, a logo button for the extension appears at the top, right of the browser to the right of the Address field for the purpose of quickly launching the extension.
Step 2: Launch the RESTClient extension
-
Click the RESTClient browser toolbar button at the top, right to launch (open) it.
The RESTClient extension appears in a new browser tab.
Step 3: Specify Authentication Information
-
At the top, left select Basic Authentication from the Authentication drop-down menu.
The Basic Authentication dialog box form pops up in a small foreground window.
-
On the Basic Authentication dialog box, enter your Username and Password in the corresponding text entry fields, then click the Okay button.
An Authentication Basic tag appears in the Headers section with an unique identifier.
At this point, with the authentication information saved, you are then able to establish a connection with the axe Monitor server. For example, you could specify the GET request method, enter your axe Monitor environment instance URL, then click the SEND button and authenticate automatically with the saved Username/Password credentials.
Step 4: Requesting Custom Headers
Adding a custom header can be done via Headers > Custom Header with the following name and value: (Name: Content-Type
and Value: application/json
).
-
From the main RESTClient horizontal menu, select Headers > Custom Header.
The Request Headers dialog box form pops up in a foreground window.
-
On the Request Headers dialog box, type
Content-Type
in the Name field,application/json
in the Value field, then click the Okay button.The Request Headers dialog box window closes and a tag appears in the Headers section to show the content type header request you just added.
Step 5: Completing User Authentication with a Post Request and Validating the Response
Signing in to axe Monitor from the REST API client can be done via specification of the following: Method: POST
, URL: <ComplyURL>/worldspace/account/ajax/login
, and Body: {"email":"user@deque.com","password":"password"}
. After sending the post with email and password to the sign-in URL, the client displays a message to indicate successful authentication.
-
In the Request section, click the down arrow button to the right of the Method field, then select the POST option from the drop-down menu.
-
Type (or paste from virtual clipboard) into the URL field the address of your desired axe Monitor server environment instance followed by
../worldspace/account/ajax/login
(for example, https://comply-qa.dequelabs.com/worldspace/account/ajax/login). -
In the Body field of the Request section, type (or paste) the following:
{“email”:user@deque.com <mailto:user@deque.com>,”password”:”password”}
-
At the top, right click the SEND button.
-
In the Response section, click the Response tab.
A message appears to indicate successful authentication and the API version, for example:
{“authenticated”:true,”version”:”1.1.8”}
You are now set up to test other API calls against the server, as desired.
Getting Started with Postman
Before you begin
The following steps assume you have already downloaded the free Postman app from https://www.getpostman.com/apps for your platform, installed it, and opened it first.
Step 1: Specify Authentication Information
After you specify the desired URL and environment of your instance of axe Monitor, you can then configure Basic Auth and specify a Username and Password that will represent the signed-in user you will impersonate as you interact with data associated with their account.
-
On the Authorization tab, select
Basic Auth
from the TYPE drop-down menu on the left sidebar. -
Populate the Username field with the user you want to authenticate as (if different from your own).
-
Populate the Password field with the value associated with the Username you intend to sign in as.
-
Under the TYPE menu, click the Preview Request button.
A popup message will appear at the lower right corner to indicate success. This means the authorization header is automatically generated when the request was sent.

Step 2: Request Custom Headers
-
On the HEaders tab, type
Content-Type
in the KEY field.The type-ahead suggestion should reveal this as a selectable option as you type.
-
Type
application/json
in the VALUE field.The type-ahead suggestion should reveal this as a selectable option as you type.

Step 3: Complete User Authentication with a Post Request to Validate
-
At the top, left actions menu, select POST.
-
Type
<URL>/worldspace/account/ajax/login
in the URL field. -
On the Body tab, populate the KEY field with the user you want to authenticate as (if different from your own).
-
On the next line, specify a Password key with the value associated with the Username you intend to sign in as.
-
Click the SEND button. 
A code message is returned to indicate authentication and the version:
{ "authenticated": true, "version": "1.1.8" }
Working with Organizations and Projects
The subheadings that follow cover additional actions that can be taken pertaining to both organizations and projects.
Retrieving organization names for a user
To get the organization names associated with a signed-in user, after signing in, without any parameters in body part, use a GET request method to the /organizations URL.
Method: GET
URL:
Example: https://comply-qa.dequelabs.com/worldspace/organizations
Retrieving organization project names for a user
To get the organization project names associated with a signed-in user, after signing in, without any parameters in body part, use a GET request method to the /organizationprojects URL.
Method: GET
URL:
Example: https://comply-qa.dequelabs.com/worldspace/organizationprojects
Retrieving an organization project summary report for a user
To get the organization project summary report associated with a signed-in user, after signing in, without any parameters in body part, use a GET request method to the /project/summaryReport/## URL.
Method: GET
URL:
Example: https://comply-qa.dequelabs.com/worldspace/project/summaryReport/13
Downloading organization rules for a user
To download the rules associated with an organization of which the signed-in user is a member, after signing in, without any parameters in body part, use a GET request method to the /rules/org/$organizationid URL.
Method: GET
URL:
Example: https://comply-qa.dequelabs.com/worldspace/rules/org/34
Downloading public project rules for a user
To download the rules associated with a public project for the signed-in user, after signing in, without any parameters in body part, use a GET request method to the /rules URL.
Method: GET
URL:
Example: https://comply-qa.dequelabs.com/worldspace/rules
Downloading organization project issues for a user
To download the issues associated with an organization project for the signed-in user, after signing in, without any parameters in body part, use a GET request method to the /issues/projectid:label URL.
Method: GET
URL:
Example: https://comply-qa.dequelabs.com/worldspace/94:temp1
Retrieving a list of organizations and organization projects for a user by custom attribute
To get a listing of the orgs. and org.projects by custom attribute for a signed-in user, after signing in, without any parameters in body part, use a GET request method to the /projects/byCustomAttribute?customAttribute=
Method: GET
URL:
Example: ../worldspace/projects/byCustomAttribute?customAttribute=levela&value=usa
Deleting organization project pages for a user
To delete the organization project pages for a signed-in user, after signing in, without any parameters in body part, use a DELETE request method to the /pages/##/ URL.
Method: DELETE
URL:
Example: https://comply-qa.dequelabs.com/worldspace/pages/94
Retrieving organization project analyzed pages for a user
To fetch the analyzed pages (content markup) for a signed-in user’s organization project, after signing in, without any parameters in body part, use a GET request method to the /pages URL.
Method: POST
URL:
Example: https://comply-qa.dequelabs.com/worldspace/pages
Body:
{"id":"853","fetchUrl":"off","analyze":"on","compliance":"on","store":"off","page":"http://mars.dequ ecloud.com/Services.htm","content":"markup"}
Retrieve a project or page group's dashboard data
URL: /project/summaryReport/$id
where $id is project id
Method: GET
Content-Type: application/json
Parameters:
practice
: practice name in it's short form (Example "A" for accessibility)potentialIssues
: on/off (on: will include potential issue counts in the report, off: will not include potential issue counts)begin
: start date in MM-dd-yyyy format (inclusive of this date’s data)end
: end date in MM-dd-yyyy format (inclusive of this date’s data)pages
: page group id (-1 if we need to get report for project)
Results:
success
: true if operation succeeded, otherwise falsemessage
: if operation failed, a detailed error messagereport
: results as followsname
: project nameid
: project IDscore
: the last scan in the period specifiedissuesPerPage
totalPages
critical
: number of pages with one or more critical issuesserious
: number of pages with one or more serious issuesfair
: number of pages with one or more moderate issuesgood
: number of pages with one or more minor or no issuespageGroupSummaries
: above summary data (name ,id, score etc) for each page group in the project. A json array ofname
: name of the page groupid
: page group idscore
: scorescoreTrend
: score trend data for page grouppageCount
: pages count under this page groupp3
: number of pages with one or more critical issues in this page groupp2
: number of pages with one or more serious issues in this page groupp1
: number of pages with one or more moderate issues in this page groupp0
: number of pages with one or more minor issues in this page groupissuesPerPage
: average number of issues per page
issuelist
: list of issue groupings with data as followsissuegrouping
: issue group codegrouping
: issue group short description (E.g. Alternative Text, Page structure etc)standard
: standard descriptionpriority
: priority of issues in this groupdesc
: description of issues in this grouplevel
: WCAG level of this issue group if standard is WCAG, otherwise nullissues
: issues countpages
: pages countpercent
: %age of pages in which this group of issues reportedissueType
: type of issue (Common/Manual/Automated)
Sample Result
{"success":true,"report":{"name":"qawb-7-jul-pgrps","id":81,"score":8,"issuesPerPage":17,"totalPages":54,"critical":49,"serious":1,"fair":0,"good":4,"pageGroupSummaries":[{"name":"laptop","id":75,"score":0,"scoreTrend":[["\"2016-07-07
05:59:29.0\"",0],["\"2016-07-07
10:53:28.0\"",0],["\"2016-07-08
03:29:49.0\"",0]],"pageCount":5,"p3":5,"p2":0,"p1":0,"p0":0,"issuesPerPage":33},{"name":"desktop","id":76,"score":0,"scoreTrend":[["\"2016-07-07
05:59:29.0\"",0],["\"2016-07-07
10:53:28.0\"",0],["\"2016-07-08 03:29:49.0\"",0]],"pageCount":5,"p3":5,"p2":0,"p1":0,"p0":0,"issuesPerPage":31},{"name":"cart","id":77,"score":0,"scoreTrend":[["\"2016-07-07
05:59:29.0\"",0],["\"2016-07-07
10:53:28.0\"",0],["\"2016-07-08
03:29:50.0\"",0]],"pageCount":3,"p3":3,"p2":0,"p1":0,"p0":0,"issuesPerPage":32},{"name":"support","id":78,"score":0,"scoreTrend":[["\"2016-07-07
05:59:29.0\"",0],["\"2016-07-07
10:53:28.0\"",0],["\"2016-07-08
03:29:50.0\"",0]],"pageCount":1,"p3":1,"p2":0,"p1":0,"p0":0,"issuesPerPage":18},{"name":"contact","id":79,"score":0,"scoreTrend":[["\"2016-07-07
05:59:29.0\"",0],["\"2016-07-07
10:53:28.0\"",0],["\"2016-07-08
03:29:50.0\"",0]],"pageCount":1,"p3":1,"p2":0,"p1":0,"p0":0,"issuesPerPage":15},{"name":"deals","id":80,"score":0,"scoreTrend":[["\"2016-07-07
05:59:29.0\"",0],["\"2016-07-07
10:53:28.0\"",0],["\"2016-07-08
03:29:50.0\"",0]],"pageCount":5,"p3":5,"p2":0,"p1":0,"p0":0,"issuesPerPage":43},{"name":"accounts","id":81,"score":0,"scoreTrend":[["\"2016-07-07
05:59:29.0\"",0],["\"2016-07-07
10:53:28.0\"",0],["\"2016-07-08
03:29:50.0\"",0]],"pageCount":4,"p3":4,"p2":0,"p1":0,"p0":0,"issuesPerPage":21}],"issuelist":[{"issuegrouping":"TEXT_ALTERNATIVES","grouping":"Alternative
text","standard":"Success Criterion 1.1.1 Non-text
Content","priority":"Serious","desc":"image
need alt text.","level":"Level
A","issues":1,"pages":1,"percent":"2%","issueType":"Manual"},{"issuegrouping":"TEXT_ALTERNATIVES","grouping":"Alternative
text","standard":"Success Criterion 1.1.1 Non-text
Content","priority":"Critical","desc":"Text
equivalent for button is missing or empty.","level":"Level
A","issues":2,"pages":1,"percent":"2%","issueType":"Automated"},{"issuegrouping":"COLOR","grouping":"Color","standard":"Success
Criterion 1.4.3 Contrast
(Minimum)","priority":"Serious","desc":"Poor
visibility between text and background
colors.","level":"Level
AA","issues":555,"pages":31,"percent":"57%","issueType":"Automated"},{"issuegrouping":"STRUCTURE","grouping":"Page
structure","standard":"Success Criterion 3.1.1 Language of
Page","priority":"Critical","desc":"The
primary language of this document has not been
set.","level":"Level
A","issues":22,"pages":22,"percent":"41%","issueType":"Automated"},{"issuegrouping":"TABLES","grouping":"Tables","standard":"Success
Criterion 1.3.1 Info and Relationships","priority":"Moderate","desc":"Use
header-id method to mark up column and row header cells on complex tables like
this using 'rowspan' or 'colspan'(on 'th') in 'tbody'
section.","level":"Level A","issues":15,"pages":13,"percent":"24%","issueType":"Automated"},{"issuegrouping":"TABLES","grouping":"Tables","standard":"Success
Criterion 1.3.1 Info and
Relationships","priority":"Minor","desc":"Table
does not have a caption element.","level":"Level
A","issues":48,"pages":35,"percent":"65%","issueType":"Automated"},{"issuegrouping":"TABLES","grouping":"Tables","standard":"Success
Criterion 1.3.1 Info and
Relationships","priority":"Moderate","desc":"Text
of first row that spans the width of table should be marked up as
caption.","level":"Level
A","issues":2,"pages":2,"percent":"4%","issueType":"Automated"},{"issuegrouping":"TABLES","grouping":"Tables","standard":"Success
Criterion 1.3.1 Info and Relationships","priority":"Minor","desc":"Summary
for layout tables should be empty or absent. This table has been detected as a
layout table because it has only one column of data that is not
empty.","level":"Level
A","issues":2,"pages":1,"percent":"2%","issueType":"Automated"},{"issuegrouping":"NAVIGATION","grouping":"Navigation","standard":"Success
Criterion 2.1.1 Keyboard","priority":"Minor","desc":"Use
client-side image maps instead of server-side
maps.","level":"Level
A","issues":1,"pages":1,"percent":"2%","issueType":"Automated"},{"issuegrouping":"FRAMES","grouping":"Frames","standard":"Success
Criterion 2.4.1 Bypass Blocks","priority":"Serious","desc":"Missing
title for this frame or iframe element.","level":"Level
A","issues":1,"pages":1,"percent":"2%","issueType":"Automated"},{"issuegrouping":"FORMS","grouping":"Forms","standard":"Success
Criterion 1.3.1 Info and Relationships","priority":"Critical","desc":"Checkbox
control does not have an explicit label or a title
attribute.","level":"Level
A","issues":2,"pages":2,"percent":"4%","issueType":"Automated"},{"issuegrouping":"FORMS","grouping":"Forms","standard":"Success
Criterion 1.3.1 Info and
Relationships","priority":"Critical","desc":"Password
field does not have an explicit label or a title
attribute.","level":"Level
A","issues":8,"pages":6,"percent":"11%","issueType":"Automated"},{"issuegrouping":"FORMS","grouping":"Forms","standard":"Success
Criterion 1.3.1 Info and
Relationships","priority":"Critical","desc":"Radio
button does not have an explicit label or a title
attribute.","level":"Level
A","issues":2,"pages":1,"percent":"2%","issueType":"Automated"},{"issuegrouping":"FORMS","grouping":"Forms","standard":"Success
Criterion 1.3.1 Info and
Relationships","priority":"Critical","desc":"Text
entry field does not have an explicit label or a title
attribute.","level":"Level
A","issues":40,"pages":33,"percent":"61%","issueType":"Automated"},{"issuegrouping":"FORMS","grouping":"Forms","standard":"Success
Criterion 1.3.1 Info and
Relationships","priority":"Critical","desc":"Select
(combo) control does not have an explicit label or a title
attribute.","level":"Level A","issues":5,"pages":3,"percent":"6%","issueType":"Automated"},{"issuegrouping":"SEMANTICS","grouping":"Semantics","standard":"Success
Criterion 2.4.2 Page
Titled","priority":"Minor","desc":"Document
does not contain a title element.","level":"Level
A","issues":4,"pages":4,"percent":"7%","issueType":"Automated"},{"issuegrouping":"TEXT_ALTERNATIVES","grouping":"Alternative
text","standard":"Success Criterion 1.1.1 Non-text
Content","priority":"Serious","desc":"Images
must have an alt attribute","level":"Level A","issues":111,"pages":26,"percent":"48%","issueType":"Automated"},{"issuegrouping":"STRUCTURE","grouping":"Page
structure","standard":"Success Criterion 1.3.1 Info and
Relationships","priority":"Critical","desc":"This
page does not have enough headings.","level":"Level
A","issues":22,"pages":22,"percent":"41%","issueType":"Automated"},{"issuegrouping":"PARSING","grouping":"Parsing","standard":"Success
Criterion 4.1.1
Parsing","priority":"Critical","desc":"The
id attribute's value should be unique.","level":"Level
A","issues":14,"pages":5,"percent":"9%","issueType":"Automated"},{"issuegrouping":"TEXT_ALTERNATIVES","grouping":"Alternative
text","standard":"Success Criterion 4.1.2 Name, Role,
Value","priority":"Critical","desc":"Buttons
or elements that act as buttons MUST have a visible name or text alternative
for image","level":"Level
A","issues":2,"pages":1,"percent":"2%","issueType":"Automated"},{"issuegrouping":"TEXT_ALTERNATIVES","grouping":"Alternative
text","standard":"Success Criterion 4.1.2 Name, Role, Value","priority":"Critical","desc":"HTML
links or elements that act as links MUST have a visible name or text
alternative for image as well as an HREF","level":"Level
A","issues":50,"pages":22,"percent":"41%","issueType":"Automated"}]}}
Retrieve a project list by a custom attribute name/value pair
URL: /projects/byCustomAttribute
Method: GET
Response Content-Type: application/json
Parameters:
customAttribute
: Name of the custom attribute by which project list need to be pulledvalue
: value of the custom attribute to match while fetching projects list
Results:
status code
: 200 if operation succeeded and 400 on bad inputsuccess
: true if operation succeeded, otherwise falsemessage
: if operation failed, a detailed error messageprojects
: list of projects with below fieldsid
: project IDname
: project name
Working with Custom Rules
In the custom rule code sample that follows, alter the following four values as desired:
- organizationId = retrieved from axe Monitor (this can be found in the URL of organization settings)
- name = the name for your custom rule
- description= description for the custom rule
- customRuleSetJson = enable rules to be included in custom rule with a “true”
Location of the ID# at end of General Organization Settings page URL in axe Monitor
Custom Rule Example
{
"organizationId": 7, "name": "axe Monitor",
"description": "Dylan's custom rule", "customRuleSetJson": “true”
{
"rules": [
{
"id": "dylang", "enabled": false, "metadata": {
"description": "Ensures lang attributes have the value of dylan", "help": "lang attribute must have the value of dylan",
"helpUrl": "https://example.com/dylang"
},
"selector": "html",
"any": [],
"all": [], "none": [ "dylang"
],
"tags": [ "wcag2aa"
]
},
{
"id": "areaalt", "enabled": false
},
{
"id": "buttonname", "enabled": false
},
{
"id": "datatable", "enabled": false
},
{
"id": "definitionlist", "enabled": false
},
{
"id": "dlitem", "enabled": false
},
{
"id": "duplicateid", "enabled": false
},
{
"id": "imagealt", "enabled": false
},
{
"id": "inputimagealt", "enabled": false
},
{
"id": "label", "enabled": false
},
{
"id": "linkname", "enabled": false
},
{
"id": "list", "enabled": false
},
{
"id": "listitem", "enabled": false
},
{
"id": "accesskeys", "enabled": false
},
{
"id": "ariaallowedattr", "enabled": false
},
{
"id": "ariarequiredattr", "enabled": false
},
{
"id": "ariarequiredchildren", "enabled": false
},
{
"id": "ariarequiredparent", "enabled": false
},
{
"id": "ariaroles", "enabled": false
},
{
"id": "ariavalidattrvalue", "enabled": false
},
{
"id": "ariavalidattr", "enabled": false
},
{
"id": "audiocaption", "enabled": false
},
{
"id": "blink", "enabled": false
},
{
"id": "bypass", "enabled": false
},
{
"id": "checkboxgroup", "enabled": false
},
{
"id": "colorcontrast", "enabled": true
},
{
"id": "documenttitle", "enabled": false
},
{
"id": "emptyheading", "enabled": false
},
{
"id": "frametitle", "enabled": false
},
{
"id": "headingorder", "enabled": false
},
{
"id": "htmlhaslang", "enabled": false
},
{
"id": "htmllangvalid", "enabled": false
},
{
"id": "imageredundantalt", "enabled": false
},
{
"id": "labeltitleonly", "enabled": false
},
{
"id": "layouttable", "enabled": false
},
{
"id": "linkintextblock", "enabled": false
},
{
"id": "marquee", "enabled": false
},
{
"id": "metarefresh", "enabled": false
},
{
"id": "metaviewportlarge", "enabled": false
},
{
"id": "metaviewport", "enabled": false
},
{
"id": "objectalt", "enabled": false
},
{
"id": "radiogroup",
"enabled": false
},
{
"id": "region", "enabled": false
},
{
"id": "scope", "enabled": false
},
{
"id": "serversideimagemap", "enabled": false
},
{
"id": "skiplink", "enabled": false
},
{
"id": "tabindex", "enabled": false
},
{
"id": "validlang", "enabled": false
},
{
"id": "videocaption", "enabled": false
},
{
"id": "videodescription", "enabled": false
},
{
"id": "applet", "enabled": false
}
],
"checks": [
{
"id": "dylang", "options": [
"dylan"
],
"evaluate": "function (node, options) {\n var lang = (node.getAttribute(\"lang\") ||
\"\").trim().toLowerCase();\n var xmlLang = (node.getAttribute(\"xml:lang\") ||
\"\").trim().toLowerCase();\n var invalid = [];\n (options || []).forEach(function(cc) {\n
cc = cc.toLowerCase();\n if (lang && (lang === cc || lang.indexOf(cc.toLowerCase() + \"\")
=== 0)) {\n lang = null;\n }\n if (xmlLang && (xmlLang === cc || xmlLang.indexOf(cc.toLowerCase() + \"\") === 0)) {\n xmlLang = null;\n }\n
});\n if (xmlLang) {\n invalid.push('xml:lang=\"' + xmlLang + '\"');\n }\n if (lang)
{\n invalid.push('lang=\"' + lang + '\"');\n }\n if (invalid.length) {\n this.data(invalid);\n return false;\n }\n return false;\n }",
"metadata": {
"impact": critical",
"messages": {
"pass": "The lang attribute is Dylan",
"fail": "The lang attribute can only be Dylan"
}
}
}
]
}
}
Adding a new custom rule to axe Monitor through REST API
URL: https://comply-qa.dequelabs.com/worldspace/customrulesets
Method: POST
Instructions: Copy the given custom rule code (as shown in the above example) and paste into the REST API client Body field after updating the code as desired (for example, the required org.ID and custom rule name), then click the SEND button.
Success response after sending the custom rule content to axe Monitor
After adding the custom rule to axe Monitor from the REST API client, sign in to axe Monitor and navigate to the org.policies page, where you will see the rule is available for selection as an active standard:
Example of the selected custom rule in the Active Standards table in axe Monitor
Create a custom rule set for a given organization
URL: /customrulesets
Method: POST
Response Content-Type: application/json
Parameters:
organizationId
: organization idname
: name of the custom rule setdescription
: description of the custom rule setcustomRuleSetJson
: rule set json
Results:
status code
: 200 if operation succeeded and 400 on bad inputsuccess
: true if operation succeeded, otherwise falsemessage
: if operation failed, a detailed error message
Dylang Example - https://dequeuniversity.com/assets/json/dylang.json
Update a custom rule set with a given id
URL: /customrulesets/$id
Method: PUT
Response Content-Type: application/json
Parameters:
$id
: id of rule set to be updatedname
: name of the custom rule setdescription
: description of the custom rule setcustomRuleSetJson
: rule set json
Results:
status code
: 200 if operation succeeded and 400 on bad inputsuccess
: true if operation succeeded, otherwise falsemessage
: if operation failed, a detailed error message
Delete a custom rule set with a given id
URL: /customrulesets/$id
Method: DELETE
Response Content-Type: application/json
Parameters:
$id
: id of rule set to be deleted
Results:
Successful result message display after the delete method completes
status code
: 200 if operation succeeded and 400 on bad inputsuccess
: true if operation succeeded, otherwise falsemessage
: if operation failed, a detailed error message
Retrieve the details of a custom ruleset for a axe Monitor organization using REST API
URL: /customrulesets/$id
Method: GET
Response Content-Type: application/json
Parameters:
organizationId: organization id
Example Result:
https://comply-qa.dequelabs.com/worldspace/customrulesets/7
Response Body section displaying retrieved custom ruleset code content from specified URL
Retrieve a list of custom and default rulesets for an organization as part of project details API
URL: /projects/$id
Method: GET
Response Content-Type: application/json
Parameters:
$id
: project id
Example of successful retrieval of project details displayed in the Response body tab
Results:
success
: true if operation succeeded, otherwise falsemessage
: if operation failed, a detailed error messageproject
: project detailsprojectconfig
: project config detailsdomains
: list of domainstemplates
: scope definitionsrulePrioritizations
: rule prioritizationsissueSrcLength
: configured issue source length allowedstandardOptions
: standardseventOptions
: event optionsqualityOptions
: quality optionspractices
: practices for projectprjStandards
: Project standardsuseHash
: Use hash to determine page uniquenesshashJS
: JavaScript to generate hash if provideddefaultRuleset
: default rule set for the organization. If none it would set to the one given in axe Monitor's config file for property standardToUseByFireEyesII.rulesets
: list of rule setsid
: id of the rule setname
: name of the rule setdescription
: description of the rule setruleSetJson
: rule set json
Retrieve a list of custom and default rulesets for an organization from the project resources API
URL: /projects/resources/$id
Method: GET
Response Content-Type: application/json
Parameters:
$id
: project id
Result Example:
Example of project resources retrieved for a project id displayed in the Response Body tab of the RESTClient
Result data can include:
success
: true if operation succeeded, otherwise falsemessage
: if operation failed, a detailed error messagelabels
: list of project labelsusernames
: list of active user namesscripts
: list of project scriptsproject
: project detailsdefaultRuleset
: default rule set for the organization. If none it would set to the one given in axe Monitor's config file for property standardToUseByFireEyesII.rulesets
: list of rule setsid
: id of the rule setname
: name of the rule setdescription
: description of the rule setruleSetJson
: rule set json
Retrieve a list of custom rule sets for a given organization
URL: /customrulesets
Method: GET
Response Content-Type: application/json
Parameters:
- organizationId: organization id
Results:
status code
: 200 if operation succeeded and 400 on bad inputsuccess
: true if operation succeeded, otherwise falsemessage
: if operation failed, a detailed error messagecustomRuleSets
: list of custom rule sets with below fields for each rule setid
: id of the rule setname
: name of the rule setdescription
: description of the rule setruleSetJson
: rule set json
Retrieve the details of a custom rule set for a given id
URL: /customrulesets/$id
Method: GET
Response Content-Type: application/json
Parameters:
$id
: id of the rule set
Results:
status code
: 200 if operation succeeded and 400 on bad inputsuccess
: true if operation succeeded, otherwise falsemessage
: if operation failed, a detailed error messagecustomRuleSet
: rule set details with below fieldsid
: id of the rule setname
: name of the rule setdescription
: description of the rule setruleSetJson
: rule set json
Other Specific API Calls Available (with Endpoints)
Additionally, the following calls are also available as of the v.6.2 axe Monitor API, which include the corresponding endpoints for each that you can point your HTTP client at to interact with data resources. '%s' corresponds to the unique identifier that represents a system-assigned numeric value.
- "status": "worldspace/status"
- "project": "worldspace/projects/%s"
- "resources": "worldspace/projects/resources/%s"
- "script": "worldspace/scripts/%s"
- "edit-scope": "worldspace/templates/%s"
- "delete-scope": "worldspace/templates/%s"
- "add-scope": "worldspace/templates"
- "upload-script": "worldspace/issues"
- "get-issues": "worldspace/issues/forAxe/%s"
- "upload-issues": "worldspace/issues/fromAxe/save"
- "rulesetDefinitions": "custom-rules/ruleSetDefinitions"
- "axe-version": "custom-rules/axeVersions/%s"
- "axe-versions": "custom-rules/axeVersions/"
- "update": "worldspace/logEntry/download"
- "rulesets": "worldspace/standardToUseByFireEyesII"
Note: This corresponds to the axe-core standard intended for use with both axe Monitor and the axe DevTools extension.