[{"label":"Latest (1.0.0)","version":"latest"}]
crest

All

Description

Crest can perform multiple tests in a single API call. It checks WCAG violations on a webpage and provides XPaths/CSS selectors of the violated elements. It currently supports the following functionalities and their detailed information can be found on their documentation page. 

  1. Keyboard Focus Indicator

  2. Closed Captioning and Transcript

  3. Heading Analysis

Request

Request

URL

URL


post
http://{api_host}/crest/api/all
Copy

Request Body

Request Body

request_body of mimetype application/json Required
Response

Response

Response Body

Response Body

200 OK

Returns CrestSuccessResponse of type application/json

The Success response contains categories that aggregate all the Error and Alert related issues.

{
	"categories": {
		"alert": {
			"count": 1,
			"description": "Alerts",
			"items": {
				"cr_heading_unrelated": {
					"count": 1,
					"description": "Possibly unrelated heading",
					"id": "cr_heading_unrelated",
					"level": "AA",
					"xpaths": [
						"/html[1]/body[1]/div[1]/a[1]"
					]
				}
			}
		},
		"error": {
			"count": 4,
			"description": "Errors",
			"items": {
				"cr_captions_missing": {
					"count": 1,
					"description": "Captions missing",
					"id": "cr_captions_missing",
					"level": "A"
				},
				"cr_focus_low": {
					"count": 1,
					"description": "Low contrast on Focus",
					"id": "cr_focus_low",
					"level": "AA",
					"xpaths": [
						"/html[1]/body[1]/div[1]/a[1]"
					]
				},
				"cr_focus_missing": {
					"count": 1,
					"description": "Focus not visible",
					"id": "cr_focus_missing",
					"level": "AA",
					"xpaths": [
						"/html[1]/body[1]/div[1]/a[1]"
					]
				},
				"cr_transcript_missing": {
					"count": 1,
					"description": "Podcast transcript missing",
					"id": "cr_transcript_missing",
					"level": "A"
				}
			}
		}
	},
	"statistics": {
		"allitemcount": 5,
		"pageurl": "http://www.abc.com",
		"time": 5.13,
		"totalaudios": 1,
		"totalelements": 60,
		"totalvideos": 1
	},
	"status": {
		"httpstatuscode": 200,
		"success": "True"
	}
}
Errors

Errors

failure_response
400

Bad Request, missing something, or the request body wasn’t correct.

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"reporttype":3,"url":"http://www.abc.com"}' http://{api_host}/crest/api/all


[{"label":"Latest (1.0.0)","version":"latest"}]
crest
Feedback

Was this page helpful?