Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Incremental Load of Sense Users from SaaS API

Hi,

I seem to be hitting some issues with the API /api/v1/Users.

What I want to do is quite simple, enumerate getting those with the most recent lastUpdated value first, paging back through 100 at a time to get all users.

Once this has been done I would like to persist this to QVD, so on the next run the latest update time can be retrieved and only as many pages from the users API be pulled until there are changes older than the most recent in the QVD. Once that has happened the QVD can be appended. Classic incremental load.

The API doesn't seem to support this though, as many of the parameters which should be there (according to https://qlik.dev/apis/rest/users) do not seem to be there, and there are some parameters which would be required which are not even in the documentation (changedSince).

The documentation suggests that ?sort=%2dlastUpdated should work, but it returns an error (?sort=%2dcreated does work). Using the separate sortBy and sortOrder parameters seems to work even less well, a parameter of ?sortBy=create fails.

I'm guessing that I can sort by name descending and use the endingBefore after peeking for the id of the last row of the table. This would be fine for the first pass (providing you don't have more than a page of invites, as I am not sure how they sort) but I can't see how this could then be used for incrementals.

I'm aware that I could use the pagination settings on the API call, but I don't want to be calling the API more than I have to, as this seems wasteful.

Any suggestions would be gratefully received.

Steve

 

Labels (1)
  • SaaS

0 Replies