Hey guys, I've stumbled in a problem doing post migration steps where I had to pass my entire worklog payload to a PUT request when editing it. It caused a major problem on production because of timezone differences.
The idea is to add a new endpoint for PATCH.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH
This request method allows you to edit pontually a single variable or single piece of the register in the database via API without having to pass the entire payload, as I had to.
Thank you.
Tempo Products | Tempo Timesheets, Tempo Planner |
Tempo Platform | Cloud |
For the implementation side, I am a python developer, checking request types on requests is easy, but Idk in which language you guys doing your magic.
The example I would give is to receive the payload with the api in the header (bearer token, standard).
If request.method == PATCH:
for key, value in payload.items():
# edit columns of the database based on the keys supplied in the payload.
# As I don't know your code, this idea would work on python.
I think this is solvable with less than 30 lines of code.
Thank you for your time.