You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to import a nmap scan via the API. Able to import via the swagger interface, unable with python and other items. Receiving: 400 Bad Request, Error: ["product_name parameter missing"]
Steps to reproduce
In the webui I created a product "TestProduct2" and added an engagement (id:2)
I'm able to query those items via the API.
I've tried passing in only the engagement (as mentioned in the swagger docs)
and I've tried to add the product_name parameter e.g. 'product_name':'TestProduct2', No change.
Looking at your code there, you're passing the form-data as part of the headers, rather than as part of the body of the request, hence your fields aren't being passed correctly the API to parse.
Here's my upload function I use for scans for reference on passing the fields + file as form-data.
Attempting to import a nmap scan via the API. Able to import via the swagger interface, unable with python and other items. Receiving: 400 Bad Request, Error: ["product_name parameter missing"]
Steps to reproduce
In the webui I created a product "TestProduct2" and added an engagement (id:2)
I'm able to query those items via the API.
I've tried passing in only the engagement (as mentioned in the swagger docs)
and I've tried to add the product_name parameter e.g. 'product_name':'TestProduct2', No change.
Expected behavior
Expecting import of report as seen with the swagger interface.
Deployment method (select with an
X
)Environment information
Logs
Sample scan files
Screenshots
Additional context (optional)
The text was updated successfully, but these errors were encountered: