Hi everyone,
I'm trying to use the <my_control_room_url>/v1/audit/messages/list API to get information from our audit log, but I don't get a proper response.
This is how my python code looks like:
---------------------------------------------------------------------------------------------------
audit_url = "<my_control_room_url>/v1/audit/messages/list"
headers = {
'accept': 'application/json',
'X-Authorization': <my_access_tokenl>,
'Content-Type': 'application/json',
}
data = '{ "username": "myusername", "password": "mypassword"}'
response = requests.post(audit_url, headers=headers, data=data)
---------------------------------------------------------------------------------------------------
And this is what I get as a response from the server:
---------------------------------------------------------------------------------------------------
Status code: 200
{
"page": {
"offset": 0,
"total": 227189,
"totalFilter": 10000
},
"list": o]
}
---------------------------------------------------------------------------------------------------
Why is the list empty? I also tried setting filter in the body request as shown in the swagger documentation, but the list remains empty. What am I doing wrong?
If someone could give me any tips, I'd appreciate it.
Thanks!