Reputation: 31
We are not able to submit file for static analysis
Tried with the request as below :
curl -X POST "https://de.api.labs.sophos.com/analysis/file/static/v1/"
-H "Authorization: <token>"
-H "Content-Type: multipart/form-data"
-F "file=@<file_path>"
(As suggested in curl request text box)
Got Error as:
{"error": "Not Found"}
As per the documentation this error means The requested URL does not exist (Not Found).
But we are using the same URL as mentioned in Doc
Upvotes: 1
Views: 131
Reputation: 91
Swagger's try it out feature, that generates the curl command, is currently unoperational, but you are right in that the endpoint should accept requests with the trailing slash in the URL.
Thank you for the bug report, we will fix this in the next patch, which can be expected to roll out before the end of next week. in a later release.
Upvotes: 1
Reputation: 31
I copied the curl command from text box at https://api.labs.sophos.com/doc/analysis/file/static.html and ran it directly
It turned out that the suggested command in code block is having different URL that from list under Servers
In list server url is https://de.api.labs.sophos.com/analysis/file/static/v1 but in Curl we are getting https://de.api.labs.sophos.com/analysis/file/static/v1/(/ is appended) which in turn returns "Not Found" error
Tried after omitting / from URL and it worked
Upvotes: 2