Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get list of app sheets from REST API?

Hi,

I would like to get the list of available sheets for a given app from the REST API.

I manage to get the list of available apps with the qrs/app endpoint, but I don't find any way to get the list of available sheets in an app.

What is the endpoint to get the list of sheets?

Thanks,

Michaël

1 Solution

Accepted Solutions
Alexander_Thor
Employee
Employee

As app.id is not part of the main entity add /full/ to your url to instantiate additional properties and relationships.
This will also allow you to filter on related entities such as app.id

Sample request via the Proxy:
https://servername/qrs/app/object/full?filter=app.id eq <some guid>&Xrfkey=abcdefghijklmnop

PS. You probably want to filter by objectType in conjuncation or you will get, pardon my french, a shit ton of results for a large document

View solution in original post

15 Replies
Øystein_Kolsrud
Employee
Employee

To get the list of sheets I believe you will have to go through the engine API. Exactly how to do that depends on the technology you use for your connection.

Not applicable
Author

Hello Øystein, thanks for your answer.

What do you mean by the technology I use for my connection? I do HTTP calls with a X-Qlik-Xrfkey header, with certifications files (PEM), on port 4242 of our Qlik Sense server.

I tried to call the /qrs/app/object?filter=app.id eq <ID of the app> endpoint, which could have returned the list of sheets among others, but unfortunately this doesn't return anything.

Not applicable
Author

Hi Michael,

As Oystein suggested you have to use the Engine API, not the QRS endpoint. Check: https://help.qlik.com/en-US/sense-developer/3.2/Subsystems/EngineAPI/Content/introducing-engine-API....

The easier way to get the sheets is using a macro that combines CreateSessionObject + GetLayout.

I also suggest you have a look at the Engine API Explorer tool in the Dev Hub. It will help you to get up to speed since it contains some interesting macros that you can perhaps use. (Including get sheets).

Not applicable
Author

Hi Jose,

That's interesting indeed, as I manage to list the sheets in the Engine API Explorer, with the Engine API.

But can the Engine API be called with HTTP queries?

Regards,

Michaël

Øystein_Kolsrud
Employee
Employee

Well, by "technology" I primarily meant your choice of programming language. We have APIs for working with the engine in both JavaScript and C#, so if you use any of those languages, then there are tools available for you to make your life easier.

Not applicable
Author

Engine API follows JSON-RPC specification... But if you are in a Javascript context another interesting approach could be using the Enigma.js framework. GitHub - qlik-oss/enigma.js: JavaScript library for consuming Qlik backend services.

Alexander_Thor
Employee
Employee

Hey,

The QRS stores sheets and stories metadata so you can query the QRS API to extract that information.

A example query via the Proxy (you can add additional filters if you just want a single app):

HTTP GET

https://servername/qrs/app/object/full?filter=objectType+eq+%27sheet%27&Xrfkey=abcdefghijklmnop

If you want to get information and interact with the actual sheet object then you would have load the document into memory and use the Engine API.

As a side note, the QRS has one id for the sheet which is the reference to the row in the QRS db. There is also a property on the returned entity that's engineObjectId which indicates the ID that the Engine uses and sub-sequentially which you would use with the Engine API.

Alexander_Thor
Employee
Employee

As app.id is not part of the main entity add /full/ to your url to instantiate additional properties and relationships.
This will also allow you to filter on related entities such as app.id

Sample request via the Proxy:
https://servername/qrs/app/object/full?filter=app.id eq <some guid>&Xrfkey=abcdefghijklmnop

PS. You probably want to filter by objectType in conjuncation or you will get, pardon my french, a shit ton of results for a large document

Not applicable
Author

Hi Alexander!

Thank you for your answer, I think we are close to it!

I had already tried your solution, but surprisingly the app.id seems not to work. No results are returned when I add this filter. That's really too bad, as it seems to be a nice solution, and in conjunction with the filter=objectType+eq+%27sheet filter you mentioned in your other post, it should do the trick.

I'm going to make some other tests, and I will let you know.