[GH-ISSUE #1082] API DELETE method fails on domains and accounts #903

Closed
opened 2026-02-27 11:14:10 +03:00 by kerem · 7 comments
Owner

Originally created by @figassis on GitHub (Mar 26, 2017).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1082

Impacted versions

  • Modoboa: 1.7.0
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

  1. Generate API Token form modoboa user settings
  2. Configure Postman with "Authorization: Token " header
  3. Send DELETE request to {domain}/api/v1/accounts/{id} or {domain}/api/v1/domains/{id}

Current behavior

A 200 response code is returned along with full json of object to DELETE
A GET request still returns the same object with a 200 response

Expected behavior

A 200 response code is returned along with full json of object to DELETE
A GET request should return a 404 response code, with a { "detail": "Not found." } response.

Originally created by @figassis on GitHub (Mar 26, 2017). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1082 # Impacted versions * Modoboa: 1.7.0 * installer used: Yes * Webserver: Nginx # Steps to reproduce 1. Generate API Token form modoboa user settings 2. Configure Postman with "Authorization: Token <token>" header 3. Send DELETE request to {domain}/api/v1/accounts/{id} or {domain}/api/v1/domains/{id} # Current behavior A 200 response code is returned along with full json of object to DELETE A GET request still returns the same object with a 200 response # Expected behavior A 200 response code is returned along with full json of object to DELETE A GET request should return a 404 response code, with a { "detail": "Not found." } response.
kerem 2026-02-27 11:14:10 +03:00
Author
Owner

@tonioo commented on GitHub (Mar 28, 2017):

A DELETE request should return a 204 code on success, not 200... Have you checked the response payload?

<!-- gh-comment-id:289705493 --> @tonioo commented on GitHub (Mar 28, 2017): A DELETE request should return a 204 code on success, not 200... Have you checked the response payload?
Author
Owner

@figassis commented on GitHub (Mar 28, 2017):

Yes, it's a the full json object of the resource I attempted to DELETE

Assis Ngolo
CEO, Nellcorp

On Mar 28, 2017, 9:52 AM +0100, Antoine Nguyen notifications@github.com, wrote:

A DELETE request should return a 204 code on success, not 200... Have you checked the response payload?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub (https://github.com/modoboa/modoboa/issues/1082#issuecomment-289705493), or mute the thread (https://github.com/notifications/unsubscribe-auth/AA7-cSYHm2qnVNUm8_IZNHi48qDDgwmiks5rqMpHgaJpZM4MpX77).

<!-- gh-comment-id:289705926 --> @figassis commented on GitHub (Mar 28, 2017): Yes, it's a the full json object of the resource I attempted to DELETE Assis Ngolo CEO, Nellcorp On Mar 28, 2017, 9:52 AM +0100, Antoine Nguyen <notifications@github.com>, wrote: > > A DELETE request should return a 204 code on success, not 200... Have you checked the response payload? > > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub (https://github.com/modoboa/modoboa/issues/1082#issuecomment-289705493), or mute the thread (https://github.com/notifications/unsubscribe-auth/AA7-cSYHm2qnVNUm8_IZNHi48qDDgwmiks5rqMpHgaJpZM4MpX77). > > >
Author
Owner

@tonioo commented on GitHub (Mar 28, 2017):

Have you tried with something else than postman?

<!-- gh-comment-id:289706291 --> @tonioo commented on GitHub (Mar 28, 2017): Have you tried with something else than postman?
Author
Owner

@figassis commented on GitHub (Mar 31, 2017):

Sorry for the late reply. No, I haven't tried with anything else. Is it working for you?

<!-- gh-comment-id:290640664 --> @figassis commented on GitHub (Mar 31, 2017): Sorry for the late reply. No, I haven't tried with anything else. Is it working for you?
Author
Owner

@tonioo commented on GitHub (Apr 3, 2017):

@figassis Could you please try with something else (curl or similar)?

<!-- gh-comment-id:291115667 --> @tonioo commented on GitHub (Apr 3, 2017): @figassis Could you please try with something else (curl or similar)?
Author
Owner

@figassis commented on GitHub (May 5, 2017):

@tonioo, I tried with curl (using php) and was able to delete accounts. So it might be a postman issue.

<!-- gh-comment-id:299533764 --> @figassis commented on GitHub (May 5, 2017): @tonioo, I tried with curl (using php) and was able to delete accounts. So it might be a postman issue.
Author
Owner

@tonioo commented on GitHub (May 5, 2017):

Ok, so I close the issue.

<!-- gh-comment-id:299541768 --> @tonioo commented on GitHub (May 5, 2017): Ok, so I close the issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#903
No description provided.