I am unable to create a data mutation for the new Tracker endpoint using the useDataMutation hook, as it fails while attempting to access the new Tracker API with the apiVersion in the URL.
Chrome console logs indicate that a 404 is returned when an attempt is made by app runtime data engine to access /api/37/tracker. The new Tracker API is confirmed to be working if /api/tracker endpoint is used rather than /api/<apiVersion>/tracker, however, data engine seems to settle for the latter.
Hi @barbietunnie, sorry you are running into this issue.
It is correct that this is not currently supported in 2.37 - it has been fixed in 2.38 and will be backported to the next patch of 2.37 soon (see DHIS2-12819)
Until this has been patched in 2.37 we will be updating the app-runtime to support this endpoint. That should be available next week, I will update here when it is available. You can always use direct REST API fetch calls in the meantime.
Thanks for this @austin! Any update on the app runtime update? I was just looking at the commit history and it seems like this is still a work in progress?
Thanks for the fix. However, this only works for the tracker resource and not its sub-resources such as tracker/jobs. I can open a PR for a fix to change this check to resource.startsWith('tracker') along with the necessary tests.