-
using the code below (almost word for word from the falconpy wiki - https://falconpy.io/Service-Collections/Real-Time-Response-Admin.html#rtr_createput_files) i keep getting any help would be greatly appreciated code
|
Beta Was this translation helpful? Give feedback.
Answered by
jshcodes
Mar 7, 2023
Replies: 1 comment 1 reply
-
Hi @73F0SG1R - Try the following code. from falconpy import APIHarness
falcon = APIHarness(client_id=CLIENT_ID, client_secret=CLIENT_SECRET)
description = input('description of file: ')
name = input('name, with extension, of file: ')
comments_for_audit_log = input('comments for audit log: ')
filename = input('cloud file name: ')
PAYLOAD = {
"description": description,
"name": name,
"comments_for_audit_log": comments_for_audit_log
}
with open(name, "rb") as upload_file:
file_upload = [('file', (filename, upload_file.read(), 'application/octet-stream'))]
response = falcon.command("RTR_CreatePut_Files", data=PAYLOAD, files=file_upload)
print(response) Thank you for reporting this issue, this documentation page needs to be updated. I will get a ticket created for this. 🙇 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
73F0SG1R
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @73F0SG1R -
Try the following code.
Thank you for …