Copy Report¶
POST /1.3/reports/copy/{id}
Description¶
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 copyFromProvidedSubmission
parameter is true
, 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. First pull the original report, make the desired edits, then pass the edited JSON to this
endpoint. Leaving fields as null
will either result in error, or overwrite fields with null
values if
null
is valid for that field.
Parameters¶
URL Path Parameters¶
Parameter | Required | Default | Description |
---|---|---|---|
id | X | the ID of the source report to copy from |
Query String Parameters¶
Parameter | Required | Default | Description |
---|---|---|---|
destEnclaveId | X | the ID of the enclave to copy the report to | |
copyFromProvidedSubmission | false |
whether to apply edits from a supplied report object and list of tags |
Request Body¶
If the copyFromProvidedSubmission
parameter is true
, the request JSON body must be a Report object.
- One additional field is required in this JSON:
tags
, which is an array of tag names. These will replace the tags from the original report. - The
enclaveIds
field in the JSON body should not be provided, and will be ignored if it is. The enclave of the report is given instead by thedestEnclaveId
parameter.
Specifically, the body must be well formed json with the following fields:
Parameter | Required | Default | Description |
---|---|---|---|
title | X | Title of the report | |
reportBody | X | Text content of report | |
externalTrackingId | null |
External tracking ID provided by user. Must be unique across all reports for a given company and enclave. | |
externalUrl | null |
URL for the external report that this originated from, if one exists. Limit 500 alphanumeric characters. | |
timeBegan | current time | ISO-8601 formatted incident time with timezone, e.g. 2016-09-22T11:38:35+00:00 |
|
tags | X | A list of tags to use if copyFromProvidedSubmission is true . MUST be provided if copyFromProvidedSubmission is true .
NOTE: The tags from the source report will be completely ignored, and this list of tags will be used instead. |
Response (200)¶
A JSON containing the ID of the copied report.
Example Usage¶
Request¶
curl -k -H "Content-Type: application/json" -X POST -d \
'{"title":"curl api-report", "reportBody":"This is a test report body with some indicators: 1.2.3.4, evil.exe, api.evildomain.com, hash d2dd1bcdd6d6cfac59ba9638d2cd886c ", "externalTrackingId": "M-1234", "timeBegan":"2016-09-22T11:38:35+00:00", "tags": ["tag_1", "tag_2"]}' \
-H "Authorization: Bearer {access_token}" "https://api.trustar.co/api/1.3/reports/copy/ae6f8d14-0811-4ab5-90a6-5c6b21e20200"
Response¶
{
"id": "81f89c56-265a-11e8-b467-0ed5f89f718b
}