Closed xakrurychle closed 1 year ago
@xakrurychle Just to be clear, the fcli sc-sast rest call
command is supposed to call the Controller REST API, not SSC REST API. However, there seems to be a bug in the current dev_develop
version that uses the incorrect base URL; see #353.
Can you please confirm whether you are trying to invoke an endpoint on the Controller, or on SSC? To my knowledge, there is no (public) Swagger interface for ScanCentral SAST Controller, and looking at the 23.1.0 CoreController
source code, I don't see any pools
endpoint.
Just as an example, the following seems to work fine with fcli 2.0.0-beta:
==> ~/Downloads/fcli-beta sc-sast rest call /rest/v2/ping
Message
Thu Jul 20 07:45:49 UTC 2023 I am still alive.
As discussed with @xakrurychle, the UnexpectedHttpResponseException was probably caused by user error; later attempts showed no output, which was due to the default table
output being unable to properly render the response. With #354 being fixed, this is no longer an issue.
Trying to run
./fcli sc-sast rest call -X GET <endpoint>/pools
I received this response. If I run the appropriate request within swagger it works. One thing thats clearly different is the need for header authentication in swagger, I failed to find a solution to include that in fcli, might that be the reason? However,unauthenticated call in swagger returned 403
,this error is 404
so it might be completely unrelated.