Can't request delete operation from API
See original GitHub issueWhen I try to request the delete operation fon an instance I got a stack trace from django (I’m on version 1.7.6b).
That’s the curl I try to execute :
curl -X POST "https://[...]/api/service_catalog/instance/[...]/operation/[...]/request/" -d '{ "fill_in_survey": { } }' -H 'Content-Type: application/json' -H "accept: application/json" -H "authorization: Bearer [...]"
And that’s the django stack trace :
[...]
File "/app/service_catalog/models/request.py", line 62, in full_survey
return {k: v for k, v in {**self.fill_in_survey, **self.admin_fill_in_survey}.items() if v is not None}
Exception Type: TypeError at /api/service_catalog/instance/[...]/operation/[...]/request/
Exception Value: 'str' object is not a mapping
Request information:
USER: admin
GET: No GET data
POST: No POST data
FILES: No FILES data
COOKIES: No cookie data
[...]
Please note that deleting from UI works as expected.
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top Results From Across the Web
rest - Status code when deleting a resource using HTTP ...
The DELETE method is idempotent. This implies that the server must return response code 200 (OK) even if the server deleted the resource...
Read more >Message "DELETE operations cannot have a requestBody ...
The API I was working indeed is a DELETE method having a request payload. So the error message is correct. However, several servers...
Read more >Unable to delete API Management Resource - Microsoft Q&A
I'd like to delete it but Azure won't allow me to do so since the resource is considered to be 'transitioning' between states....
Read more >Delete API | Elasticsearch Guide [8.5] | Elastic
You use DELETE to remove a document from an index. You must specify the index name and document ID. You cannot send deletion...
Read more >DELETE - HTTP - MDN Web Docs
The HTTP DELETE request method deletes the specified resource.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @EliasBoulharts, it works like a charm, thanks for helping! 😃
Fixed