Format for imports?


#1

So, trying to do import of files via API that work fine when I do it online, but receive the below…
(files are either json or just plain text files with just IPs listed)

< HTTP/1.1 100 Continue
< HTTP/1.1 400 Bad Request
< Content-Length: 30
< Vary: Accept-Encoding
< Server: CherryPy/unknown
< Date: Thu, 27 Sep 2018 13:55:30 GMT
< X-Frame-Options: DENY
< Content-Type: text/html;charset=utf-8
< Set-Cookie: session_id=6595f686783a94e4d65ffc054abe7670d7a09e19; expires=Thu, 27 Sep 2018 14:55:30 GMT; httponly; Path=/; secure

  • HTTP error before end of send, stop sending
    <
  • Closing connection 0

Import is not correct

dat0013301@rubbish:~/work$

Here is the curl…

curl -kv -F ‘file_name=intel.txt’ -F import_params=’{“tlp”:“TLP:RED”, “severity”:“high”, “threat_type”: “p2p”, “auto_approve”:“no”,“confidence”:“10”,“tags”:“FireEye”, “token”:’"$key"’}’ https://www.my.site:8080/api/v1/import_intel

I’m sure it’s something simple, just been pulling my hair out for hours.

Thanks for any help!