Web Tests API
All get requests need a header with subscription key and value: ‘Subscription Key:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx‘.
Create new Test Runs for websites
POST: https://api.sofy.ai/v1/websites/create
Curl Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai/v1/websites/create
Input JSON
[
{
"browser": "chrome",
"NodesToTest": 20,
"WebTestRunType": [
"all"
],
"url": "https://www.json-generator.com/"
}
]
Output JSON
[
{
"WebTestRunID": 846,
"ApplicationID": 23990,
"URL": "https://www.json-generator.com/",
"CreatedDatetime": "11/20/2018 8:09:55 AM"
}
]
Get all applications previously tested by a particular subscription key
GET: https://api.sofy.ai/v1/websites/Lists
CURL Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai/v1/websites/Lists
Output JSON
[
{
"ApplicationGUID": "04f83b0d-4292-4faa-9ae5-9ef26bec4f8c",
"ApplicationID": 23990,
"Platform": "WEB",
"PackageName": "https://www.json-generator.com/",
"CreateDateTime": "2018-11-20T07:39:50.707",
"ModifiedDateTime": "2018-11-20T08:09:55.873",
"PlatformName": "WEB"
}
]
Get details on a previously tested particular application
GET: https://api.sofy.ai/v1/websites?appid=23990
Parameters
ApplicationID
Curl Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai/v1/websites?appid=23990
Output JSON
[
{
"ApplicationGUID": "04f83b0d-4292-4faa-9ae5-9ef26bec4f8c",
"ApplicationID": 23990,
"Platform": 4,
"PackageName": "https://www.json-generator.com/",
"CreateDateTime": "2018-11-20T07:39:50.707",
"ModifiedDateTime": "2018-11-20T08:09:55.873",
"PlatformName": "WEB"
}
]
Get information on the last 100 test runs performed with a particular subscription key
GET: https://api.sofy.ai/v1/websites/testruns/lists
Curl Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai/v1/websites/testruns/lists
Output JSON
[
{
"ApplicationId": 23990,
"WebTestRunID": 846,
"URL": "https://www.json-generator.com/",
"OS": "windows",
"Browser": "chrome",
"OSVersion": "Win10",
"WebTestRunType": "LightHouse",
"CreatedDatetime": "2018-11-20T08:09:55.87",
"StatusValue": "Completed"
}
]
Get information on all test runs associated with an application
GET: https://api.sofy.ai/v1/websites/testruns?appid=23990
Parameters
Application ID
Curl Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai/v1/websites/testruns?appid=23990
Output JSON
[
{
"ApplicationId": 23990,
"WebTestRunID": 846,
"OS": "windows",
"Browser": "chrome",
"OSVersion": "Win10",
"AuditCategory": "all,",
"StartTime": "2018-11-20T08:09:55.87",
"StatusValue": "Completed"
}
]
Get summary for a particular test run
GET: https://api.sofy.ai/v1/websites/testresults/summary?testrunid=846
Parameters
Test Run ID
Curl Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai/v1/websites/testresults/summary?testrunid=846
Output JSON
[
{
"WebTestRunID": 846,
"Audit_Performance_Score": 95,
"Audit_Progressive_Score": 46,
"Audit_Accessibility_Score": 82,
"Audit_BestPractices_Score": 79,
"Audit_SEO_Score": 80
}
]
Get a list of all audits performed during a particular test run
GET: https://api.sofy.ai//v1/websites/testresults/audits?testrunid=846
Parameters
Test Run ID
Curl Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai//v1/websites/testresults/audits?testrunid=846
Output JSON
[
{
"WebTestRunId": 846,
"ScreenshotID": 21244,
"Audit_Category": "Accessibility",
"Audit_Code": "accesskeys",
"Status": "",
"Title": "`[accesskey]` values are unique",
"Description": "https://dequeuniversity.com/rules/axe/2.2/accesskeys?application=lighthouse",
"Suggestions": "https://dequeuniversity.com/rules/axe/2.2/accesskeys?application=lighthouse",
"AuditOutput": "",
"Impact": "LOW"
}
]
Get a list of all audits performed during a particular test run
GET: https://api.sofy.ai//v1/websites/testresults/audits?screenshotid=21244
Parameters
Screenshot ID
Curl Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai//v1/websites/testresults/audits?screenshotid=21244
Output Json
[
{
"WebTestRunId": 846,
"ScreenshotID": 21244,
"Audit_Category": "Accessibility",
"Audit_Code": "accesskeys",
"Status": "",
"Title": "`[accesskey]` values are unique",
"Description": "https://dequeuniversity.com/rules/axe/2.2/accesskeys?application=lighthouse",
"Suggestions": "https://dequeuniversity.com/rules/axe/2.2/accesskeys?application=lighthouse",
"AuditOutput": "",
"Impact": "LOW"
}
]
Get a list of all audits performed during a particular test run belonging to a particular category (Visual Quality, Performance, Security, Best Practices, and Reliability)
GET: https://api.sofy.ai//v1/websites/testresults/audits?testrunid=846&category=Accessibility
Parameters
TestRun ID
Curl Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai//v1/websites/testresults/audits?testrunid=846&category=Accessibility
Output JSON
[
{
"WebTestRunId": 846,
"ScreenshotID": 21244,
"Audit_Category": "Accessibility",
"Audit_Code": "accesskeys",
"Status": "",
"Title": "`[accesskey]` values are unique",
"Description": "https://dequeuniversity.com/rules/axe/2.2/accesskeys?application=lighthouse",
"Suggestions": "https://dequeuniversity.com/rules/axe/2.2/accesskeys?application=lighthouse",
"AuditOutput": "",
"Impact": "LOW"
}
]
Get a list of all nuggets generated for a particular application
GET: https://api.sofy.ai/v1/websites/testresults/nuggets?testrunid=10
Parameters
TestRun ID
Curl Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai/v1/websites/testresults/nuggets?testrunid=10
Output JSON
[
{
"AppNuggetID": 3,
"ApplicationID": 22718,
"WebTestRunID": 10,
"AuditID": 52,
"Description": "Accessibility audit link-name failed on 20 number of pages. ",
"Archived": true,
"CreatedDateTime": "2018-09-11T23:27:34.613",
"CreatedBy": "webapi",
"ImpactedPages": 20
}
]
Get a list of all nuggets generated for a particular test run
GET: https://api.sofy.ai/v1/websites/testresults/nuggets?nuggetid=3
Parameters
Nugget ID
Curl Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai/v1/websites/testresults/nuggets?nuggetid=3
Output JSON
[
{
"AppNuggetID": 3,
"ApplicationID": 22718,
"WebTestRunID": 10,
"AuditID": 52,
"Description": "Accessibility audit link-name failed on 20 number of pages. ",
"Archived": true,
"CreatedDateTime": "2018-09-11T23:27:34.613",
"CreatedBy": "webapi",
"ImpactedPages": 20
}
]
Get description of a particular nugget and the screens on which it was generated
GET: https://api.sofy.ai/v1/websites/testresults/nuggets?appid=3
Parameters
Application ID
Curl Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai/v1/websites/testresults/nuggets?appid=3
Output JSON
[
{
"AppNuggetID": 3,
"ApplicationID": 22718,
"WebTestRunID": 10,
"AuditID": 52,
"Description": "Accessibility audit link-name failed on 20 number of pages. ",
"Category": "Accesibility",
"Impact": "Low",
"AUDITDESCRIPTION": "AUDITDESCRIPTION",
"Suggestions": "Suggestions",
"CreatedDateTime": "2018-09-11T23:27:34.613",
"ImpactedPages": 20
}
]
Get description of all credentials belonging to a particular application Id
GET: https://api.sofy.ai /v1/ApplicationCredentials/Get?AppID=23216
Parameters
Application ID
Curl Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai /v1/ApplicationCredentials/Get?AppID=23216
Output JSON
[
{
"PackageName": "https://www.homedepot.com",
"AppCredentialID": 2,
"CredentialName": "",
"CredentialType": "custom",
"DomainAuthority": "gmail",
"SignInURL": "dfdsfd",
"UserName": "cvvxcvcx",
"UserNameControl": "xxxxx",
"UserPassword": "xxxccccqcccc",
"UserPasswordControl": "vcvxccxc",
"SubmitControl": "xzczxcxzc",
"CreateDateTime": "2018-11-28T11:45:00.347",
"Archive": false
}
]
Get description of a particular application credential ID
GET: https://api.sofy.ai /v1/ApplicationCredentials/GetbyAppCred?AppCredID=2
Parameters
Application Credential ID
Output JSON
[
{
"PackageName": "https://www.homedepot.com",
"AppCredentialID": 2,
"CredentialName": "",
"CredentialType": "custom",
"DomainAuthority": "gmail",
"SignInURL": "dfdsfd",
"UserName": "cvvxcvcx",
"UserNameControl": "xxxxx",
"UserPassword": "xxxccccqcccc",
"UserPasswordControl": "vcvxccxc",
"SubmitControl": "xzczxcxzc",
"CreateDateTime": "2018-11-28T11:45:00.347",
"Archive": false
}
]
Create new application credentials
POST: https://api.sofy.ai /v1/ApplicationCredentials/Create
Curl Request
curl -H "SubscriptionKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" https://api.sofy.ai /v1/ApplicationCredentials/Create
Input JSON
[
{
"ApplicationID": "23999",
"CredentialName": "test",
"CredentialType": "facebook",
"DomainAuthority": "facebook",
"SignInURL": "tester",
"UserName": "tester",
"UserNameControl": "",
"UserPassword": "tester",
"UserPasswordControl": "",
"SubmitControl": "tester"
}
]
Output JSON
[
{
"AppCredentialID": 23,
"ApplicationID": 23999,
"CredentialName": "test",
"CredentialType": "custom",
"DomainAuthority": "facebook",
"SignInURL": "tester",
"UserName": "tester",
"UserNameControl": "",
"UserPassword": "tester",
"UserPasswordControl": "",
"SubmitControl": "tester",
"CreateDateTime": "2018-12-04T04:56:40.337",
"ModifiedDateTime": "2018-12-18T06:18:46",
"CreatedBy": "usman@sofy.ai",
"ModifiedBy": "usman@sofy.ai",
"Archive": false
}
]