Copy Report¶
-
TruStar.
copy_report
(src_report_id, dest_enclave_id, from_provided_submission=False, report=None, tags=None)¶ Copy a report to another enclave. All properties of the report, including tags, will be copied. A reference to the original report will still be stored on the child, allowing the system to track the relationship between the original report and copies made from it.
If the
from_provided_submission
parameter isTrue
, then edits can be applied to the copied report. This is useful in cases where the body or title must be redacted first, or the list of tags needs to be altered for the copy. In this case, a Report object and a list of tag names must be provided, which will fill out the copied report. A reference to the original report will still be stored on the copy. NOTE: Partial edits are not allowed. ALL fields must be filled out on this object, and the fields from the original report will completely ignored.Parameters: - src_report_id (str) – the ID of the report to copy
- dest_enclave_id (str) – the ID of the enclave to copy the report to
- from_provided_submission (boolean) – whether to apply edits from a supplied report object and list of tags
- report (Report) – (required if
from_provided_submission
isTrue
) a report object containing an edited version to use as the copy. This allows information to be redacted, or other arbitrary edits to be made to the copied version. NOTE: Partial edits are not allowed. ALL fields must be filled out on this object, and the fields from the original report will completely ignored. - tags (list(str)) – (required if
from_provided_submission
isTrue
) a list of tags to use iffrom_provided_submission
isTrue
. NOTE: iffrom_provided_submission
is True, the tags from the source report will be completely ignored, and this list of tags will be used instead. MUST be provided iffrom_provided_submission
isTrue
.
Returns: the ID of the newly-created copy