m-ld / timeld

Live shared timesheets
MIT License
1 stars 1 forks source link

API import not returning create IDs and not supporting updates #57

Closed kroky closed 2 years ago

kroky commented 2 years ago

I need to map the created timesheet entry IDs from timeld to my timesheet entries locally, so I know I don't send them again for import. Can import endpoint return created entry IDs?

Also, if I don't have the IDs of the entries, I can't send update requests. I know the API doesn't support updates for now but probably a future extension would do it? Both prejorunal and Tiki support timesheet entry updates via the API.

gsvarovsky commented 2 years ago

Every imported JSON object is treated as an overwrite. So you can update an entry by sending its information again with some change.

For timesheet entries, you must include an external property which is the identifier in your system. If you send the same identifier again, it will overwrite the previous entry information. So, there's no need for you to know our internal ID.

(For Timesheets and Projects, you have to specify the @id anyway.)

kroky commented 2 years ago

I see. Then, we are all set here.