Newly created asset through API not locateable by GUID
I am using the RAM api to programatically create assets for our application. The asset create and the session.put work fine, I am returned the GUID but a subsequent asset find by GUID then fails. Is there some sort of server side cacheing or indexing that presents a delay between the time that the asset is created and the time it is locatable by its GUID. If so is there a way I can force a refresh of some sort ?? I am quite sure that the asset is created because if I login to ram . I can then find the asset through the native UI without any problem.
|
2 answers
There is a server side index that is create and can take over a minute to restart the index. However if you do a session.getAsset(AssetId) where the asset id has a guid and a version if should go to the database and not the search index. If you just pass the GUID or do a search you will have to wait for the indexer to kick in.
I am using the RAM api to programatically create assets for our application. The asset create and the session.put work fine, I am returned the GUID but a subsequent asset find by GUID then fails. Is there some sort of server side cacheing or indexing that presents a delay between the time that the asset is created and the time it is locatable by its GUID. If so is there a way I can force a refresh of some sort ?? I am quite sure that the asset is created because if I login to ram . I can then find the asset through the native UI without any problem. |
Kevin, Great tip !!! worked like a champ. I was passing in the value of "*" as the version identifier, but by changing that to the explicit version (which my application controls), the get asset call did locate the proper asset. Thank you.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.