Several times in the past few months I was hit by a quick need to extract some data about Assets for a customer, and find myself continually hand-writing the code to do so. Rather than repeat myself any more, I figure I can share my work - maybe PTC customers can benefit from the same effort.
This let's me compare the internal systemId of the Asset, the internal systemId of the Model, and the internal systemId of the Location of the device. This was to help me attempt to isolate an issue with orphaned devices not being returned in a report - exposing some duplicate locations and devices that needed corrections.
You may find yourself needing to do similar things when building logic for Axeda, or eventually integrating or migrating to Thingworx. Our v2 API bridges help "bridge" the gap.