Namachieli
Joined: 10-Mar-2022
Posts: 32
Posted: 30-Mar-2022, 17:54
#
Posted: 30-Mar-2022, 17:54
#
It looks like in all of the GET operations, a 200 is returned to indicate 'query success'.
On POST for /types a 201 is returned to indicate the operation was a success.
On POST/PATCH for /users a 200 is returned to signify the same.
201 Should likely be used for the POST endpoints, and while 201 is fine for PATCH, 202 may be more appropriate.
Xavier
Site admin
Joined: 16-Jan-2007
Posts: 7773
Posted: 30-Mar-2022, 20:39
#
Posted: 30-Mar-2022, 20:39
#
Hi, thank you for the feedback!
I changed the success response code for POST /users/{user_id}/collected_items from 200 to 201.
The PATCH operation doesn't create any new resource, and the change is already done when sending the response, so the codes 201 and 202 do not fit. I'll keep 200.
Status changed to Solved
(Xavier, 30-Mar-2022, 20:40)
Namachieli
Joined: 10-Mar-2022
Posts: 32
Posted: 30-Mar-2022, 21:34
#
Posted: 30-Mar-2022, 21:34
#
Thank you!
Used time zone is UTC+1:00.
Current time is 10:33.