Audit settings saving
AudiSite.setSettings — method saves settings in a suggested project.
Use case: With the AudiSite.setSettings method, you can add changes to the projects settings without opening a web browser.
General request parameters and instructions for using Serpstat API.
Request parameters | |||||
Parameter | Description | Type | Required | Default value | Value Options |
id | A request id: the response contains the same id. | int/string | yes |
| Text or number value |
method | API method name | string | yes |
| AudiSite.setSettings |
params | The object with parameters {...}, it lists all the following parameters and arrays [...] | yes |
|
| |
projectId | Audit project id | int | yes | 1251109 (any project ID number) | |
domain | Project domain | string | yes | lush.com | |
name | Project name | string | yes | lush.com | |
subdomainsCheck | Subdomains check | boolean | yes | true, false | |
pagesLimit | Scan pages limit | int | yes | number value, Min - 0; Max - credits of your plan | |
scanSpeed | Scan speed | int | yes | number value, Min - 1; Max - 30 | |
autoSpeed | Auto speed control | boolean | yes | true, false | |
autoUserAgent | User Agent auto switches at unsuccessful server response | boolean | yes | true, false | |
scanNoIndex | No-index pages scanning | boolean | yes | true - Auditing is performed with no_index pages included false - Auditing is performed with no_index pages excluded | |
scanWrongCanonical | Incorrect canonical pages scanning | boolean | yes | true - Auditing is performed with with non-canonical pages included false - Auditing is performed with with non-canonical pages excluded | |
scanDuration | Scan duration | int | yes | from 0 to 999999 | |
folderDepth | Scan folder depth | int | yes | from 0 to 999999 | |
urlDepth | URL depth | int | yes | from 0 to 999999 | |
userAgent | User Agent | int | yes | 0 - Chrome 1 - Serpstatbot 2 - Google 4 - Firefox 5 - IE | |
robotsTxt | Robots.txt regulations check | boolean | yes | true, false | |
withImages | Scan images | boolean | yes | true, false | |
dontScanKeywordsBlock | Don’t scan pages with keywords in URL | yes | |||
checked | should the Audit scan with such keywords or not | boolean | yes | true - if there are some keywords false - no such keywords | |
keywords | specific keywords the Audit should consider | string | yes | some text, leave it "" if there are no such keywords | |
onlyScanKeywordsBlock | Scan only pages with keywords in URL | yes | |||
checked | should the Audit scan with such keywords or not | boolean | yes | true - if there are some keywords false - no such keywords | |
keywords | specific keywords the Audit should consider | string | yes | some text, leave it "" if there are no such keywords | |
baseAuthBlock | Access to websites shut down with BaseAuth | yes | |||
login | BaseAuth login | string | yes | some text or digits, "12345" "somelogin" | |
password | BaseAuth password | string | yes | some text or digits, "12345" "somepassword" | |
mailTriggerSettings | Trigger mail settings | yes | |||
emails | Array of emails trigger mail to be sent | string[] | yes | array of emails to which trigger mailing is enabled, test@gmail.com | |
interval | Interval of trigger mailing | int | yes | 0 - manually; | |
enabled | Trigger mail enabling | boolean | yes | whether triggered mailing is enabled, true, false | |
scheduleSettings | Scan schedule settings | yes | |||
scheduleRepeatOption | Scan interval id | int | yes | 0 - manually; 1 - daily; 2 - every 3 days; 3 - weekly; 4 - every 2 weeks; 5 - monthly; | |
scanSetting | Scan type settings | yes | |||
type | Scan type mode id | int | yes | 1 - manually; 2 - by the URL list; 3 - by the sitemap; | |
list | Arrays of URL to be scanned | string[] | yes | "https://makeup.com.ua/ua/", "https://makeup.com.ua/ua/categorys/3/" | |
importedFilename | File name of previously imported URL | string|null | yes | name of the respective file |
Response parameters | |
Parameter | Description |
id | Response id corresponds the request id |
result | Contains the answer |
{
"id":1,
"method": "AuditSite.setSettings",
"params":{
"projectId":123456,
"mainSettings": {
"domain": "lush.com",
"name": "lush.com",
"subdomainsCheck": true,
"pagesLimit": 5321,
"scanSpeed": 1,
"autoSpeed" : true,
"autoUserAgent": true,
"scanNoIndex":false,
"scanWrongCanonical":true,
"scanDuration": 0,
"folderDepth": 0,
"urlDepth": 0,
"userAgent": 0,
"robotsTxt": true,
"withImages": true
},
"dontScanKeywordsBlock": {
"checked": true,
"keywords": "text1"
},
"onlyScanKeywordsBlock": {
"checked": true,
"keywords": "text2"
},
"baseAuthBlock": {
"login": "222",
"password": "444"
},
"mailTriggerSettings": {
"emails": [],
"interval": 1,
"enabled": false
},
"scheduleSettings": {
"scheduleRepeatOption": 3
},
"scanSetting": {
"type": 2,
"list": [],
"importedFilename":"xxx.xxx"
}
}
}
{
"id": "1",
"result": null
}