rest-api
rest-api copied to clipboard
dev/api/contacts/email/tags/delete 204 response is too vauge
When making a request to dev/api/contacts/email/tags/delete
to delete some tags it seems to return a 204 regardless of whether anything was actually changes or not. I can send it an array of non-existing tags and I'll still get a 204 response back.
Here's the current response codes that it handles:
Status 204: Tags deleted successfully. Status 401: Unauthorised. (when the user name and password fields are wrong.) Status 400: If the input is in wrong format.
It would be better if it returned a 200 response with the updated contact resource so I don't have to leave anything up to interpretation.
agree, many responses are vague and force to either keep things up to date with code or retrieve the resource again
IMHO the whole API is kind of... strange, it's not clear which resource you are manipulating and what is the expected behavior
dev -> ok api -> ok contacts -> ok email -> am I asking all emails from my contacts? tags -> am I asking all... tags from... contact emails? delete -> uhm... shouldn't it be a verb?
DELETE /dev/api/contacts/:contactId/tags
Status 200: Updated resource
Status 204: No tags were deleted
Status 400: If the input is in wrong format.
Status 401: Unauthorised. (when the user name and password fields are wrong.)
Status 404: Contact not found