How to add parameters to get_user_audit_logs()

Dear Support,

How should I add a parameter to the get_user_audit_logs() API function?
https://docs.rhodecode.com/RhodeCode-Enterprise/api/methods/user-methods.html#get_user_audit_logs

I want to see the audit log of a user with userId 64.
I tried get_user_audit_logs(64), and get_user_audit_logs(userid=64), but there is a syntax error…

Thanks in advance

Hi,

How are you calling that ? It’s an API method so you should use the API client params to specify user-id

.rccontrol/community-1/profile/bin/rhodecode-api --instance-name=community-1 get_user_audit_logs

Funny thing is, that it gives me back a list of entries which only contains one particular user. Every element is for that user.
I am not sure why. If I got to the web interface and lookup the audit logs, I can see every user.

That user I see for all antries is a user that is used to do some scheduled tasks, like assigne permissions, etc. So it make sense to see lots of actions of that user.
What does not make sense is to not see any other user in that list.

Actually I am trying to get action history of a user. I can use the ‘Audit log’ on the web interface, but the problem with that is that it only list 10 element per page. And there is around 100 pages (1000 entries for this user).
If I can list this on one page using the web interface, that would be enough…

Proper way to call that API for other users would be to call it like that:

.rccontrol/community-1/profile/bin/rhodecode-api --instance-name=community-1 get_user_audit_logs userid:1234