- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
06-20-2019 05:56 PM - last edited on 09-02-2020 10:16 AM by kwadsack
Hi all,
I'd like to create, read, update and/or delete Compliance Reports via the API but there's no documentation on compliance reports in the REST API documentation. It was confirmed that the API does support CRUD for compliance reports and that a ticket for the inclusion of the information in the documentation has been opened, but I was wondering if in the mean-time anyone has the information for Compliance Reports CRUD via the API in Python.
Thanks!
06-20-2019 09:05 PM
The compliance API's are documented under "Compliance Standards" in the API documentation. Updating a policy to add a control to a particular policy is done using the "Policy" API's.
My tools that I use for this purpose:
Main link - https://github.com/jdrieger/rl-toolbox
Example tool to copy a compliance report - https://github.com/jdrieger/rl-toolbox/blob/master/rl-compliance-copy.py
The main link has the general instructions for the use, but basically, the various example scripts call the rl_lib_general.py and rl_lib_api.py libraries for the API calls.
That should be fully functional and do everything you asked about (except the delete).
06-20-2019 09:18 PM
I just realized you might mean the Complaince - Reports tab. In that case, please see the tool created by Eddie:
https://github.com/ebeuerle/compliance_report_email
That is an example of downloading a report and sending it.
If you want to actually post the creation of PDF reports, that uses the "https://api.redlock.io/report" API.
Payload for the post object is formatted like:
{"cloudType":"azure","name":"test","target":{"accounts":["**Account ID's list**"],"regions":[],"timeRange":{"type":"to_now","value":"epoch"}},"type":"HIPAA"}
You can see other examples in the Chrome - Developer Tools - Network tab. Not sure why this particular API was not documented, but the UI uses it for report creation and the URL and example post objects can be pulled from there for the time being.
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!