i want to develop a service that reads all the users data from the tenant,
ex: user email, tenatant url, lastlogin time etc.
as of now i am calling api using rest template in java, but i want to use cumulocity sdk to feth the user details, which fetch the tenant url at run time and calls user api for that particular tenant.
is it possible that i can achive this using cumulocity sdk, if yes please provide the reference doc.
if no please provide the infor why i cant call user api for above requirement using cumulocity sdk.
Actually i want fetch audit record of the all the users in the tenant.
can you suggest any way to fetch audit records of all the users in tenant using cumulocity java sdk.
i have tries using auditrecord interfaces in sdk but not getting any response.
Hi @jkpatil1010
For Audit records you should use the Audit record API available in the java SDK - AuditRecordApi (Cumulocity SDK - Java Client API)
This API provides a list of below methods, you must use the method " getAuditRecordsByFilter​(AuditRecordFilter filter) and you should add the below audit record filters to fetch all the audit records of specific user.
Vachaspati has already answered that question in his first reply. Please carefully consider the help you receive and try to describe what you actually need in the first message. Also the the links you received are into the reference documentation. All services the SDK supports are documented there.
I dont see any method in UserApi that gives me the list of all the Users from the tenant.
I can see that There are functions in UserApi to fetch only particular user and current user.
so, is this the limitation of userApi that we can fetch only particular user and current user from the tenant and not all the users from the tenant in single response.
or is there any way that we can fetch all the users from the tenant using any other Api.
Getting all users using the SDK is currently not supported. All other available options were already posted by Vachas.
What’s wrong with using the RestConnector as Vachas has suggested?