Skip to main content
System StatusContact Support
VersionOne Community

Query Historical Responses

Overview

Historical queries are executed in the same fashion as regular queries however their response is formatted differently. This is due to the fact that multiple records or nodes are returned for a particular query. Historical queries use the "/Hist" portion of the URL path.

Asset Type Query

When asking for historical asset types, the root node will be called "History". Under it will be any number of nodes called "Asset" which correspond to individual assets as they existed at points in time. On the "Asset" nodes the "href" and "id" attributes will now contain a moment number that indicates at what moment the asset changed. The sub nodes "Attribute" and "Relation" are displayed in the same manner as described in the Data Asset Type Query above.

<History total="203" pageSize="2147483647" pageStart="0">
	<Asset href="/VersionOne/rest-1.v1/Data/Story/1364/818" id="Story:1364:818">
		<Attribute name="Name">Company History</Attribute> 
		<Attribute name="ToDo">40</Attribute>
		<Attribute name="ChangeDate">2005-08-01T12:28:35.577</Attribute> 
	</Asset>
	<Asset href="/VersionOne/rest-1.v1/Data/Story/1364/818" id="Story:1364:874">
		<Attribute name="Name">Company History</Attribute> 
		<Attribute name="ToDo">20</Attribute>
		<Attribute name="ChangeDate">2005-08-02T11:05:12.123</Attribute>
	</Asset>
	<Asset href="/VersionOne/rest-1.v1/Data/Story/1364/903" id="Story:1364:903">
		<Attribute name="Name">Company History</Attribute> 
		<Attribute name="ToDo">0</Attribute>
		<Attribute name="ChangeDate">2005-08-03T13:09:05.983</Attribute>					
	</Asset>
	<!-- Additional Asset Nodes -->
</History>

Asset Query

When asking for the history of a particular asset, the results will be essentially the same as the historical asset type query above. The only difference is that the only assets returned are those that have a specific ID. Otherwise the results look identical to those returned above.

<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>

Attribute Query

The history of an attribute will return a root node named "History" with a number of "Attribute" or "Relation" sub-nodes. Each sub-node corresponds to a moment in time when the asset the attribute exists on has changed. The "Attribute" or "Relation" node will have a "name" attribute that identifes the attribute and an "of" attribute which identifies the asset the attribute is on. Note that the "of" attribute will contain a URL with a moment.

<History total="2" pageSize="2147483647" pageStart="0">
	<Attribute name="Email" href="/VersionOne/rest-1.v1/Data/Member/20/0/Email" of="/VersionOne/rest-1.v1/Data/Member/20/0" /> 
	<Attribute name="Email" href="/VersionOne/rest-1.v1/Data/Member/20/113/Email" of="/VersionOne/rest-1.v1/Data/Member/20/113">admin@demo.com</Attribute> 
</History>
  • Was this article helpful?