Create scan API in Website Scanner
Use this API to create a one-time or recurring accessibility website scan.
create scan
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-accessibility.browserstack.com/api/website-scanner/v1/scans" \
-H "Content-Type: application/json" \
-d '{
"name": "My Website Scan",
"recurring": true,
"urlList": [
"https://example.com",
"https://example.com/about"
],
"schedulingOptions": {
"frequency": "Weekly",
"recurrenceTime": "14:00",
"recurrenceDay": "Monday",
"recurrenceDate": 15,
"scheduleStart": "2024-02-01",
"scheduleEnd": "2024-12-31"
},
"scanSettings": {
"advancedRules": true,
"bestPractices": false,
"needsReview": true,
"wcagVersion": "wcag21aa"
},
"localTestingInfo": {
"localIdentifier": "my-local-id",
"localEnabled": false
},
"authConfigId": 123456
}'
-
name* String
A name given to the website scan.
-
recurring Boolean
True for recurring scans. False for one-time scans.
-
urlList* Array
A list of URLs to be scanned.
-
schedulingOptions Object
Mandatory field for recurring scans with the schedule details.
-
frequency String
The frequency in which the scan has to repeat, which can be “Daily”, Weekly”, or “Monthly”.
-
recurrenceTime String
The time (HH:MM) in 24-hour GMT format at which to schedule the recurring scan.
-
recurrenceDay String
The day of the week (example Monday) on which the scan is to be scheduled, required for weekly scans.
-
recurrenceDate Integer
The day of the month (values 1-28 are allowed) on which the scan is to be scheduled, required for monthly scans.
-
scheduleStart String
The date in “YYYY-MM-DD” format on which the recurring scan has to start.
-
scheduleEnd String
The date in “YYYY-MM-DD” format until which the recurring scan continues to run.
-
-
scanSettings Object
Settings chosen for the scan.
-
advancedRules Boolean
True to report any violation of advanced rules. By default, this is set to
true
. -
bestPractices Boolean
True if best practices rules are to be included. These are not WCAG violations but are good to have to ensure accessibility. By default, this is set to
false
. -
needsReview Boolean
True if issues that require manual confirmation are to be included. By default, this is set to
true
. -
wcagVersion* String
The WCAG version to be used for the scan. By default, this is set to “wcag21aa”.
-
-
localTestingInfo Object
Enable local scans by providing information on the region in which you want to run the scan.
-
localIdentifier String
The identifier used when starting a local binary.
-
localEnabled Boolean
True if you want to run local testing.
-
-
authConfigId Integer
A unique ID of the auth config to be used for the scan.
Response Attributes 200 OK
JSON
Response
{
"success": true,
"data": {
"id": 123,
"scanRunId": 1234,
"urlCount": 20
},
"error": {
"invalidUrls": ["ww.gogle.con"]
}
}
-
success Boolean
True, if the scan is created.
-
data Object
Details of the scan created.
-
id Integer
A unique ID created for your scan.
-
scanRunID Integer
A unique ID created for your specific scan run.
-
urlCount Integer
The number of URLs submitted for scanning.
-
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.