Skip to main content
System StatusContact Support
VersionOne Community

How to query the history of a single asset

This URL will retrieve the history of the Member asset with ID 20.

http://localhost/VersionOne/rest-1.v1/Hist/Member/20
<History total="2" pageSize="2147483647" pageStart="0">
	<Asset href="VersionOne/rest-1.v1/Data/Member/20/0" id="Member:20:0">
		<Attribute name="Description" /> 
		<Attribute name="Nickname">Admin</Attribute> 
		<Attribute name="Email" /> 
		<Attribute name="AssetState">64</Attribute> 
		<Attribute name="DefaultRole.Name">System Admin</Attribute> 
		<Attribute name="Username">admin</Attribute> 
		<Attribute name="IsLoginDisabled">false</Attribute> 
		<Relation name="DefaultRole">
			<Asset href="VersionOne/rest-1.v1/Data/Role/1" idref="Role:1" /> 
		</Relation>
		<Attribute name="Name">Administrator</Attribute> 
		<Attribute name="Phone" /> 
		<Attribute name="AssetType">Member</Attribute> 
	</Asset>
	<Asset href="VersionOne/rest-1.v1/Data/Member/20/113" id="Member:20:113">
		<Attribute name="Description" /> 
		<Attribute name="Nickname">Admin</Attribute> 
		<Attribute name="Email">admin@demo.com</Attribute> 
		<Attribute name="AssetState">64</Attribute> 
		<Attribute name="DefaultRole.Name">System Admin</Attribute> 
		<Attribute name="Username">admin</Attribute> 
		<Attribute name="IsLoginDisabled">false</Attribute> 
		<Relation name="DefaultRole">
			<Asset href="VersionOne/rest-1.v1/Data/Role/1" idref="Role:1" /> 
		</Relation>
		<Attribute name="Name">Administrator</Attribute> 
		<Attribute name="Phone">555-555-1212</Attribute>
		<Attribute name="AssetType">Member</Attribute> 
	</Asset>
</History>

Remarks

This example queries from the Hist namespace, instead of the Data namespace. It responds with 2 historical versions of the same asset. The differences between the two historical assets may be difficult to spot—both the Email attribute and the Phone attribute changed.

The root node is named "History" to indicate you are viewing a historical result. The "href" attribute on each "Asset" node contains a moment after the asset type and ID portions of the path. That URL provides the path to the exact version of that specific asset, as it was at that moment.

Note how the first asset can be retrieved using moment number 0, while the second can be retrieved using moment number 113. This indicates that over 100 changes occured to other assets in the system before someone changed this Member asset.

  • Was this article helpful?