Hi, My use case is to fetch the new onboarded users. I am generating a report like in last 24 hours these users onboarded on my application. With REST Endpoint I can get the details by hitting /user/:tenantId/users?pageSize=2000&withTotalPages=true.
I am facing 2 issues-
There is no creationTime of user in the response. Is there any other endpoint I can access or any other method I can use by SDK to fetch the creation time of the user so that I can filter my new users.
Which Method and class to use to fetch all the users details. I tried autowiring the UserApi but I didnt see any get all users method. Is there any other api or method I can use to access this method.
the User object in C8Y does not have a creationTime. As a workaround you could instead check the lastPasswordChange timestamp. Or you could keep track of the previous registered users and identify yourself the new users.
The UserApi does only implement a subset of the API focussing on the current user. So you would need to call the API yourself to retrieve all users.
But the Java SDK does not implement that functionality. You would have to do the REST call yourself. Here is some discussion about how to best do that: