Skip to main content
System StatusContact Support
VersionOne Community

Query Responses

Overview

Responses for queries vary depending on what information was asked for. First, queries are separated into historical and non-historical, and then separated into the type of query. These types include Asset Type, Asset, and finally Attribute queries.

Query Data Responses

Data queries are the result of asking for a URL using the "/Data" portion of the path. These queries are for the current state of assets not the historical states.

Asset Type Query

The Asset Type query is a query to retrieve all assets of a given asset type in a single list. This list can be sorted, filtered, and paged.

The response will begin with an "Asset" node and it will contain attributes named "total", "pageSize", and "pageStart". The "total" attribute correspond to the total number of assets that would appear if the query was not paged. The "pageSize" attribute indicates how many assets were returned in a given page. Finally the "pageStart" attribute indicates where in the un-paged asset list this response begins at.

Inside the "Assets" node are any number of "Asset" nodes which correspond to the individual assets that met the filtered parameter. Each "Asset" node contains an "href" attribute which indicates the URL that the given asset resides at and it also contains an "id" attribute which is the internal ID used by VersionOne to uniquely identify the given asset.

Under each "Asset" node are any number of "Attribute" and "Relation" nodes. These nodes correspond to the attributes that make up the given instance of an asset type. Both nodes will contain a "name" attribute which identifes the name of the attribute the node represents. "Attribute" nodes will contain their value as an inner Text element. "Relation" nodes will contain one or more "Asset" nodes which are references to other assets that this specific asset relates to. Each "Asset" reference node will contain an "href" attribute which points to the instance of the related asset, and an "idref" attribute which identifies the unique VersionOne id of the related asset.

<Assets total="10" pageSize="2147483647" pageStart="0">
	<Asset href="/VersionOne/rest-1.v1/Data/Story/1021" id="Story:1021">
		<Attribute name="Name">Logon</Attribute>
		<Relation name="Status">
			<Asset href="/VersionOne/rest-1.v1/Data/StoryStatus/137" idref="StoryStatus:137" />
		</Relation>
		<Relation name="Timebox">
			<Asset href="/VersionOne/rest-1.v1/Data/Timebox/1022" idref="Timebox:1022" />
		</Relation>
		<Attribute name="DetailEstimate" />
		<Attribute name="AssetType">Story</Attribute>
		<Attribute name="AssetState">128</Attribute>
		<Attribute name="Number">S-01001</Attribute>
		<Attribute name="ToDo" />
		<Attribute name="Order">32</Attribute>
		<Relation name="Parent">
			<Asset href="/VersionOne/rest-1.v1/Data/Theme/1015" idref="Theme:1015" />
		</Relation>
		<Attribute name="Description" />
		<Attribute name="Estimate">2</Attribute>
		<Relation name="Priority">
			<Asset href="/VersionOne/rest-1.v1/Data/WorkitemPriority/140" idref="WorkitemPriority:140" />
		</Relation>
		<Relation name="Scope">
			<Asset href="/VersionOne/rest-1.v1/Data/Scope/1010" idref="Scope:1010" />
		</Relation>
		<Relation name="Owners">
			<Asset href="/VersionOne/rest-1.v1/Data/Member/1000" idref="Member:1000" />
		</Relation>
	</Asset>
	<!-- Additional Asset Nodes -->
</Assets>

Asset Query

An asset response is returned when a specific asset is asked for. It corresponds to the "Asset" sub node under the "Assets" root node described in the previous section. And example of an asset query is show below.

<Asset href="/VersionOne/rest-1.v1/Data/Member/20" id="Member:20">
	<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="/v1.six/rest-1.v1/Data/Role/1" idref="Role:1" /> 
	</Relation>
	<Attribute name="Name">Administrator</Attribute> 
	<Attribute name="Phone" /> 
	<Attribute name="AssetType">Member</Attribute> 
	<Attribute name="Description" /> 
	<Attribute name="Nickname">Admin</Attribute> 
	<Attribute name="Email">admin@demo.com</Attribute> 
</Asset>

Attribute Query

And attribute response is returned when a specific attribute on a specific asset is asked for. As described in the Asset Type Query section above, the node name may either be "Attribute" or "Relation". These nodes will also contain an "of" attribute which is a URL that points to the asset that this attribute is on.

<Attribute name="Name" href="/VersionOne/rest-1.v1/Data/Member/20/Name" of="/VersionOne/rest-1.v1/Data/Member/20">Administrator</Attribute>
  • Was this article helpful?