Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can anyone please help with the Qlik API for getting list of Published sheets?
Using the app API, I am able to get all the sheets within the app. However, I am unable to distinguish those sheets between published and unpublished sheets. Can you please help?
The API gives the sheet name and description but no information is given whether it is published or not
Hi @subramani_r ,
Not sure what method under the app API, but you can fetch the sheetList
- by creating a sessionObject with enigma with a sheetList definition - https://qlik.dev/apis/javascript/sense-client-objects#%23%2Fdefinitions%2FsheetList
- by using the capability API's getList method https://qlik.dev/apis/javascript/capabilities/#%23%2Fdefinitions%2FQApp%2Fentries%2FgetList
with parameter `sheet`
the publish prop should be under "qAppObjectList.qItems[i].qMeta.published"
I hope this helps
@subramani_r have you found the API to know whether the sheet is Published or not ?
I dont wanna use capability api.
@subramani_r san,I have found the solution,get the sheet Object first using any object search methods in this example i used getAllInfos() and then you have to use getLayout() to access all its properties including Published : Boolean
To access the Property to the following
sheetObj.qMeta.published.
Hope this helps.
This type of operations are typically easier to do using the QRS REST API using this endpoint:
https://help.qlik.com/en-US/sense-developer/May2023/APIs/RepositoryServiceAPI/index.html?page=1517
Or potentially this if you need more detailed information:
https://help.qlik.com/en-US/sense-developer/May2023/APIs/RepositoryServiceAPI/index.html?page=437
To get the list of published sheets for a given app you can call /qrs/app/object like this:
GET https://<serverUri>/qrs/app/object?filter=app.id eq <appId> and objectType eq 'sheet' and published eq true