Forum Discussion
Hello,
When querying for items in Aras Innovator, only the most recent item is returned by default. In AML, you can bypass this check by including the generation property in your AML search like the query below.
<AML>
<Item type="Part" action="get">
<config_id>B9F8E908144948E48A1747AD88716D02</config_id>
<generation condition="gt">0</generation>
</Item>
</AML>
Note that the generation property needs to be included in the body of the AML request. Including it in a where attribute would not result in all generations of the item being returned. I've tried adding generation to the $filter attribute of a REST call, and I was unable to get multiple versions of the item to return. It seems that the $filter attribute is treated much like the where attribute of an AML call. This means that it's not currently possible to return multiple versions of an item through a pure REST request.
With that explanation, there is an alternative solution that you could use. You could write a server method that would build a query like the one I mentioned above that includes generation as a property. You could then call that server method via REST in order to get multiple versions of the item.
Chris
Christopher Gillis
Aras Labs Software Engineer