PYTHON request API

I obtained this response when i try to create a site in python
“The JSON input is invalid for the ‘scan’ property of the SiteCreateResource resource, at line 1, column 57.”
But scan property is set to None by defaut and i don’t know how to use object like that .

You will have to share more context so we can understand what it is you are doing in line 1, column 57 :stuck_out_tongue:

thanks ,i search to create a rapid7 site with python
image
but i obtained this answer ,I tried everything to solve this problem and I’m running out of solution.

The error message complains about a missing ‘scan’ parameter passed to the constructor.

I am not familiar with using the API, but if I look at the documentation: vm-console-client-python/site_create_resource.py at master · rapid7/vm-console-client-python · GitHub it expects an object of the type ‘ ScanScope’. You will need to look up how to construct such an object before passing it as a parameter.

yes ,i’m agree with you ,but in the documentation ,this object seem to be optional
image

it work ,but is so boredom to make ,
here is what i have done
image