Hello Paul,
Thanks for contacting us.
Here is a sample python script that attach a file to an existing incident, assuming you install the Resilient SDK (v29 or later) already.
To use it, download the attach_to_inc.txt, and rename it to attach_to_inc.py. Then run it from an terminal
python attach-to_inc.py -s <ip address of your resilient server> -u <user email address> -p <user password> -i <incident id> -f <filename> -o <organization> -v <False to skip https certificate validation>
Please note this is only a sample script. It did not run through any QA.
Thanks,
Yongjian Feng
------------------------------
Yongjian Feng
------------------------------
Original Message:
Sent: 02-25-2019 10:41 AM
From: PAUL FORMOSA
Subject: Does anyone have a python example (rest API) of Attaching files to an Incident?
We are migrating incidents from another incident management tool to Resilient. Does anyone have an example of python using the rest API to attach a file to an incident? We have the attachments by incident number in a windows directory structure. This is a one off event for us, so we're not looking for something perfect, just functional.
------------------------------
Thanks,
Paul Formosa
------------------------------