- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
08-08-2023 05:13 AM
Hello everyone,
I am trying to get numbers of bioc and ioc rules from our xdr integration. I want to create a widget to see that how many ioc and bioc rules added week by week. Do anyone have idea for this?
Thanks in advance.
08-21-2023 03:23 AM - edited 08-21-2023 03:25 AM
Hi @ZuleyhaAy ,
Unfortunately, there is no OOTB command to get the rules. However, you can make use of xdr-get-audit-management-logs command. If you are heavily creating rules, please check the commands limitation for example for limit parameter, it says "
res = demisto.executeCommand("xdr-get-audit-management-logs", {"type": "Rules", "sub_type":"CREATE"})
count = 0
for rule in res[0]["Contents"]:
if 'BIOC created' in rule['AUDIT_DESCRIPTION']:
count += 1
demisto.results(count)
08-21-2023 03:23 AM - edited 08-21-2023 03:25 AM
Hi @ZuleyhaAy ,
Unfortunately, there is no OOTB command to get the rules. However, you can make use of xdr-get-audit-management-logs command. If you are heavily creating rules, please check the commands limitation for example for limit parameter, it says "
res = demisto.executeCommand("xdr-get-audit-management-logs", {"type": "Rules", "sub_type":"CREATE"})
count = 0
for rule in res[0]["Contents"]:
if 'BIOC created' in rule['AUDIT_DESCRIPTION']:
count += 1
demisto.results(count)
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!