Web tests API

Updated 1 year ago by SYED A HAMID

All get requests need header with Subscription key and value – ‘Subscription Key:xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx‘. If you do not have subscription key click here

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 of a particular Application previously tested

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 last 100 Test Runs by 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, 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

Applicaion Credenial 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
}
]


How did we do?