5.9. Deleting OpenSCAP reports
In Satellite Server, you can delete one or more OpenSCAP reports. However, when you delete reports, you must delete one page at a time. If you want to delete all Openscap reports, use the bash script that follows.
Deleting an OpenSCAP Report
To delete an OpenSCAP report, complete the following steps:
List all OpenSCAP reports. Note the IDs of the reports that you want to delete.
Example request:
curl --insecure --user username:_password_ \ https://satellite.example.com/api/v2/compliance/arf_reports/ | python -m json.tool
curl --insecure --user username:_password_ \ https://satellite.example.com/api/v2/compliance/arf_reports/ | python -m json.toolCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example response:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Using an ID from the previous step, delete the OpenSCAP report. Repeat for each ID that you want to delete.
Example request:
curl --insecure --user username:_password_ \ --header "Content-Type: application/json" \ --request DELETE https://satellite.example.com/api/v2/compliance/arf_reports/405
# curl --insecure --user username:_password_ \ --header "Content-Type: application/json" \ --request DELETE https://satellite.example.com/api/v2/compliance/arf_reports/405Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example response:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Example BASH Script to Delete All OpenSCAP Reports
Use the following bash script to delete all the OpenSCAP reports: