IbmUploadAttachment
Use this script to upload an attachment to an IBM QRadar SOAR incident. This script should be run within an incident.
- Type
- python
- Pack
- IBMResilientSystems
Source
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def upload_attachment(args: Dict[str, Any]) -> CommandResults:
remote_incident_id = demisto.incident()["dbotMirrorId"]
demisto.debug(f"upload_attachment {args=} | {remote_incident_id=}")
args["incident_id"] = remote_incident_id
response = demisto.executeCommand("rs-upload-incident-attachment", args)
demisto.debug(f"upload_attachment {response=}")
human_readable = (
response[0]["HumanReadable"]
if (isinstance(response, list) and len(response) > 0 and response[0]["HumanReadable"])
else ""
)
return CommandResults(readable_output=human_readable)
def main(): # pragma: no cover
try:
res = upload_attachment(demisto.args())
return_results(res)
except Exception as ex:
return_error(f"Failed to execute IbmUploadAttachment. Error: {ex!s}")
if __name__ in ["__builtin__", "builtins", "__main__"]:
main()
README
Use this script to upload an attachment to an IBM QRadar SOAR incident. This script should be run within an incident.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Cortex XSOAR Version | 6.8.0 |
Dependencies
This script uses the following commands and scripts.
- rs-upload-incident-attachment
- IBM Resilient Systems
Inputs
| Argument Name | Description |
|---|---|
| entry_id | EntryID of the file to upload. |
Outputs
There are no outputs for this script.