I'm trying to get the current version (not the latest version) from an item in the Autodesk Data Management API.
I've looked through all the endpoints and currently am using the following endpoint: https://developer.api.autodesk.com/data/v1/projects/:project_id/folders/:folder_id/contents
And I get back some information about the item I'm requesting. Of which one is the id of the item itself and one is the id of the tip of the item (which as far as I've understood is the latest version of the item).
Now it's possible through the BIM360 docs UI to change the current version of a file to one of the older versions. Now what I want is to get the id of this version when I'm requesting the information of an item. Is this at all even possbile through the Data Management API? And if so where could I get this data?
And if not through the Data Management API, is there another solution for this? I've found that through listening to Webhooks we can get updates when those items are updated, is that the only way?
Edit for additional information:
Through the BIM 360 Document management portal I've uploaded 3 versions of a file. I've made all 3 versions the current version at different times: BIM 360 version
I then get the contents of the corresponding folder through the API using Postman and I get the folllowing in the response. Using this endpoint: https://developer.api.autodesk.com/data/v1/projects/:project_id/folders/:folder_id/contents
For the document I get version is 11, which is correct and what I'm expecting. Document version response
But in that same response I also get the file version which is still on version 3 in the response, while I'm expecting and wanting to get back that it's version 2 as seen in the BIM 360 Document Management. File version response
So the question I have is how do I get the current version of the file?
I've just tested this real quick, and it seems that when you set an older version of an item as "current", BIM360 actually creates a new record at the top of the list of versions, and gives it the same name:
With that said, I believe the answer to your question is: the "current" version will always be the
tipversion.