How can I get all the assets from a specific type AND which has the 'Asset State' 'In Store'.
What is the unique and constant value for an asset. The asset name can be changed, thus how can I use the API with the ID of the asset, in order to be sure I am working with that correct asset even if the name changes.
Example. External application X queries an asset. Person A changes the asset name in the web interface of service desk. Application X now holds a value of an asset which in theory is now faulty to use for further operations. Using an ID solves this problem (except if the asset would be deleted in the mean time).
It is a bit difficult to know which parameters exist in the documentation. More in-depth documentation would be welcome.
Regarding question A:
<API version="1.0" locale="en">
<criterias>
<criteria>
<parameter>
<name compOperator="START WITH">CI Type</name>
<!-- Can give Non english values in the parameter names as well as in the data-->
<value>Windows Workstation</value>
</parameter>
<reloperator>AND</reloperator>
<parameter>
<name compOperator="CONTAINS">CI Name</name>
<value>NB</value>
</parameter>
<reloperator>AND</reloperator>
<parameter>
<name compOperator="CONTAINS">Asset State</name>
<value>In Store</value>
</parameter>
</criteria>
</criterias>
<returnFields>
<name>CI Name</name>
<name>CI Type</name>
<name>displaystate</name>
</returnFields>
<sortparameters sortOrder="desc">
<name>CI Name</name>
<name>Site</name>
</sortparameters>
<!-- If the total number pages is 100, we can give the navigation from 50 to 50 -->
<range>
<startindex>1</startindex>
<limit>300</limit>
</range>
</API>
This will not work since the parameter 'Asset State' is not recognized.