Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi techies,
The Qlik Sense Repository Service (QRS) contains all data and configuration information for a Qlik Sense site. The data is normally added and updated using the Qlik Management Console (QMC) or a Qlik Sense client, but it is also possible to communicate directly with the QRS using its API. This enables the automation of a range of tasks, for example:
We will learn how to connect with Qlik Sense via repository API using POSTMAN Desktop tool. For practice we will delete a sample sheet by repository API request.
Sheet deletion is one of the operations we can perform via API request. We have different endpoints which we can use in API request to perform operation.
We can know what are available end points in Qlik API at https://help.qlik.com/en-US/sense-developer/April2020/Subsystems/RepositoryServiceAPI/Content/Sense_...
Prerequisites:
Installation and configuration of Postman:
4. Certificates verification: Add host name, certificates as per below snapshot.:
5. Test connectivity of Postman with QSE. A valid test of postman connectivity with service account would be the following.
If everything is fine then you will see Status 200 OK and build version etc. information of QSE.
How to delete a sheet using repository API
Section 2:
{
"id": "92366630-3c23-467c-848d-a8733d253289",
"engineObjectType": "",
"description": "",
"objectType": "sheet",
"publishTime": "1753-01-01T00:00:00.000Z",
"published": false,
"name": "DeleteMe",
"engineObjectId": "77dfef2a-6fa4-4edf-bfce-12d07e14c735",
"contentHash": "AP=B$+WA3.Z[_H`@E'[;@C!Y9(95?D\/7S92!>TBLKP",
"privileges": null
}
7. Here we need Id detail from response received by GET Request: "id": "92366630-3c23-467c-848d-a8733d253289".
8. Delete a sheet by https://hostname:4242/qrs/app/object/92366630-3c23-467c-848d-a8733d253289?xrfkey=1234567890123456 with keeping X-Qlik-User= UserDirectory=internal;UserId=sa_api
9. Check QMC or HUB, you will find that DeleteMe sheet is vanished.
Note: This solution uses repository service or API which removes entry of sheet from QSR database not the actually file from binary file present in disk. If you need to cleanse the sheet from disk, please refer this beautiful document created by Levi.
https://adminplaybook.qlik-poc.com/docs/asset_management/apps/remove_unused_private_sheets.html
You can do many operations as we used delete of sheet. Please check what are the endpoints available in Qlik. End points means what operation you are trying to do with Qlik using API request.
Reach out to me at kumar.rohit1609@gmail.com if there is need of any clarification or assistance
Connect with me on LinkedIn https://www.linkedin.com/in/rohit-kumar-67ba152b/
To get latest updates and articles, join Qlik community at https://www.facebook.com/QlikIntellectuals
When applicable please mark the appropriate replies as ACCEPT AS SOLUTION and LIKE it. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as LIKE if you feel additional info is useful to others.