Hi everyone,
is it possible to fetch Historical Data from your control room via API?
Basically everything what is stored in http://<my-control-room/#/activity/historical
Thanks a lot!
Hi everyone,
is it possible to fetch Historical Data from your control room via API?
Basically everything what is stored in http://<my-control-room/#/activity/historical
Thanks a lot!
https://community.cloud.automationanywhere.digital/swagger//p>
You can get details from the Audit Logs section.
Can you try the same in POSTMAN and check? Status Code 200 is Success case.
Hello Chandu, thanks for your response
I already tried the Audit API Approch. However, all I get is an empty list as a response. Could you maybe tell me, what I'm doing wrong?
This is what 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": u]
}
-------------------------------------------------------------------------------
As you can see, the list is empty, even though I put no filter on my request.
Thanks in Advance
we can get it
Yes I will try it via POSTMAN and give an update :)
Thank you for your help
Are you using Python aswell? If so, may I see your code snippet for the request part including header and body. Maybe I'm overseeing something.
{
"sort":
[
{
"field": "createdOn",
"direction": "desc"
}
],
"filter":{
"operator":"and",
"operands"::
{"operator": "eq",
"field": "status",
"value": "Unsuccessful"
},
{"operator": "gt",
"field": "createdOn",
"value": StartTime
},
{"operator": "lt",
"field": "createdOn",
"value": EndTime
}
]
},
"page":{
"offset":0,
"length":10000
}
}
This is how my json along with filter looks like post authenticating to CR
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.