Skip to main content
Solved

HTTPV2 How to use Files Parameter

  • Sep 9, 2024 6:08 PM UTC
  • 2 replies
  • 98 views

Forum|alt.badge.img

I want to use an API endpoint to upload a file from the local file storage system in SOAR (saved to to something like "/opt/siemplify/siemplify_server"). The API documentation mandates using the files parameter like so:

curl -v -X POST https://submissions.emailsecurity.symantec.com/api/v1/fn --header "Content-Type: multipart/ form-data" --header "Authorization: Basic RlBVU0VSMjpRQVBAc3M7MQ==" -F "contactEmailAddress=admin@test.com" - F "emailNotifications=true" -F "sample=@/home/sample.eml" -k

How can I replicate this in SOAR (HTTPV2 does not support the files parameter) besides writing a custom integration/action?

Best answer by f3rz

@dk1271 if API endpoint supports base64 you can use FileUtilities powerup to transfer file to base64 blob and send it as base64 instead of using filepath. 

However, if the only approach that API endpoint allows is using a filepath, then it would be better to submit a Feature Request for HTTPv2 integration and in the meantime create customised action for this approach. 

View original

2 replies

f3rz
Staff
Forum|alt.badge.img+10
  • Staff
  • Answer
  • Sep 10, 2024 6:27 AM UTC

@dk1271 if API endpoint supports base64 you can use FileUtilities powerup to transfer file to base64 blob and send it as base64 instead of using filepath. 

However, if the only approach that API endpoint allows is using a filepath, then it would be better to submit a Feature Request for HTTPv2 integration and in the meantime create customised action for this approach. 


SoarAndy
Forum|alt.badge.img+12
  • Bronze 1
  • Sep 13, 2024 3:39 PM UTC

 

Should the file payload go into the POST body ?