Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.

Qlik Sense Repository API: How to Audit security rule for Hub Only or QMC Only

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Damien_V
Support
Support

Qlik Sense Repository API: How to Audit security rule for Hub Only or QMC Only

Last Update:

Feb 23, 2021 3:59:22 AM

Updated By:

Sonja_Bauernfeind

Created date:

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:

 

Resolution

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...

https://help.qlik.com/en-US/sense-developer/November2020/APIs/RepositoryServiceAPI/index.html?page=1...

 

Labels (1)
Version history
Last update:
‎2021-02-23 03:59 AM
Updated by: