Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ardisdk:api_search [2025/04/08 02:53] (current)
optrix created
Line 1: Line 1:
 +====/api/search====
 +
 +===Usage===
 +
 +This function returns the ID numbers of ARDI assets based on text search.
 +
 +**NOTE - We suggest the much more powerful //selector// addon or the use of //AQL// when searching for assets, as these provide much more data and are significantly more flexible**.
 +
 +===Details==
 +
 +^Detail^Value^
 +|Group|Server|
 +|From Server Version|0.9.0|
 +|Permission|[[permission_guest|Public]]|
 +|Methods|GET or POST|
 +
 +==Parameters==
 +
 +^Parameter^Notes^Meaning^
 +|**q**|String|Query|
 +|**format**|String (xml)|Either 'xml' or 'json'|
 +
 +===Return Value===
 +
 +The return value is a list of **results** that provide the asset name and ID numbers that match the //q// parameter.
 +
 +The search works much the same way as normal ARDI searches - the system looks for exact name matches, partial name matches, ID matches and partial matches with asset descriptions.
 +===Examples===
 +
 +==Request==
 +
 +<code>
 +http://<servername>/s/<sitename>/api/search?q=Oven
 +</code>
 +
 +==Success (XML)==
 +
 +<code xml>
 +<results>
 +   <result id="20" name="Main Oven"/>
 +</results>
 +</code>
 +
 +==Success (JSON)==
 +
 +<code javascript> 
 +{
 + "result": [{"id": "20", "name": "Main Oven"}]
 +}
 +</code>