Error while accepting request via API
See original GitHub issueLike discussed here https://gitter.im/HewlettPackard/squest?at=63038a0c9994996293ffe438 I am trying to implement a custom approval business logic in a python filter triggered by a global hook on request submission.
After some debug on the python module itself, I tried to use the “accept/reject” api via CURL to reduce the debug complexity, but it still throws an error.
That’s the curl command :
curl -vvv -X POST "https://[...]/api/service_catalog/request/233/accept/" -H "accept: application/json" -H "authorization: Bearer [...]"
And the error is :
{"required":"This field is required.","null":"This field may not be null.","invalid":"Invalid data. Expected a dictionary, but got {datatype}."}
Please note that :
- Request is in the “Submitted” state
- Same error is thrown when calling the “reject” api (https://[…]/api/service_catalog/request/233/reject/)
- The “cancel” api is working as expected
Seems like I am missing some parameters, but looking at the swagger those apis don’t need any payload, just request id in query string.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
We’ve identified a bug. The request cannot be accepted when a survey is not defined.
The dev image is built automatically. You can use the “dev” tag when pulling it.