taskUid in 0.28 #500
Replies: 1 comment
-
Hi @eelcol We've made that choice to bring some consistency to the API. Indeed, when receiving a direct resource response from the API, there is an However, since a write operation is an asynchronous process, you can receive that asynchronous response from multiple endpoints (e.g. on /documents, /indexes, /settings); In that case, using My advice is to have two types of objects: One type is dedicated to the In the future, we could introduce additional information in one or the other. Using two different object types makes you more open to changes that might occur if needed. |
Beta Was this translation helpful? Give feedback.
-
In version 0.28, the field
uid
is changed totaskUid
for every asynchronous taskHowever, if I want to fetch the current status of such a task, I get a response body without taskUid but with
uid
. It sort of makes sense, because you are getting data of tasks. But it also is not very consistent. Because of this, my code will always have to check if there is ataskUid
variable. If there is no such variable, use theuid
variable. In my opinion, it would make more sense to also return ataskUid
variable in the response body when querying for task(s). That would eliminate the need in the code to check if there is ataskUid
oruid
in the response body.Beta Was this translation helpful? Give feedback.
All reactions