Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Feb 23, 2021 3:59:22 AM
Sonja_Bauernfeind
Jan 29, 2021 6:22:09 AM
This is a sample on how to audit security rules with the Qlik Sense Repository Service (QRS) API.
Environments:
In order to filter on "Hub Only" or "QMC Only", "environmentAttributes" needs to be set.
Hub & QMC :
"environmentAttributes":"" (or do not specify it)
Hub Only:
"environmentAttributes":"context=AppAccess;"
QMC Only:
"environmentAttributes":"context=ManagementAccess;"
Sample:
$body = '{"resourceType":"App","subjectRef":{"resourceFilter":""},"actions":46,"environmentAttributes":"context=AppAccess;","subjectProperties":["id","name","userId","userDirectory"],"auditLimit":999999,"outputObjectsPrivileges":0,"resourceProperties":["name"]}' $hdrs = @{} $hdrs.Add("X-Qlik-xrfkey","12345678qwertyui") $hdrs.Add("hdr-usr","DOMAIN\Administrator") $url = "https://qlikserver1.domain.local/hdr/qrs/systemrule/security/audit/matrix?xrfkey=12345678qwertyui" Invoke-RestMethod -Uri $url -Method Post -Headers $hdrs -Body $body -ContentType 'application/json'
Note: the above sample is using header authentication for simplicity.
More details can be found on the help site.
https://help.qlik.com/en-US/sense-developer/November2020/APIs/RepositoryServiceAPI/index.html?page=1...