This is an example of how to modify Scheduler service settings via the Qlik Sense Repository API.
The same method can be used for other services, check the help site to find the correct endpoint for the service you want to modify settings for: Open API specification for Repository Main API
Environments:
- Qlik Sense Enterprise for Windows June 2017 and later
This is a PowerShell sample that will change the logVerbosityTaskExecution log verbosity, apart from logVerbosityTaskExecution, other parameters are compulsory parameters.
You can add some more parameters to modify several settings at once, see: put /schedulerservice/{id}
$hdrs = @{}
$hdrs.Add("X-Qlik-xrfkey","12345678qwertyui")
$hdrs.Add("X-Qlik-User","UserDirectory=DOMAIN;UserId=Administrator")
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My\" | Where {$_.Subject -like '*QlikClient*'}
$url = "https://qlikserver2.domain.local:4242/qrs/SchedulerService/befac0e7-047b-4f57-87c0-df9474321550?xrfkey=12345678qwertyui"
$body = '{"serverNodeConfiguration":{"name": "Central","hostName": "qlikserver2.domain.local","serviceCluster":{"name":"ServiceCluster"}},
"settings":{"logVerbosity":{"logVerbosityTaskExecution":1}},"modifiedDate":"2020-05-20T09:25:35.647Z"}'
Invoke-RestMethod -Uri $url -Method Put -Headers $hdrs -Certificate $cert -Body $body -ContentType 'application/json'