To search items possessing certain property, use the command core/search_items:
svc=core/search_items¶ms={"spec":{ "itemsType":<text>, "propName":<text>, "propValueMask":<text>, "sortType":<text> }, "force":<uint>, "flags":<long>, "from":<uint>, "to":<uint>}
You can find an example of this request in the sample Item search.
| Name | Description |
|---|---|
| spec | search specification |
| itemsType | item type (see the list below) |
| propName | name of the property which value will be searched (see the list of possible properties below) |
| propValueMask | property value mask (character “*” can be used) |
| sortType | name of the property used for sorting |
| force | 0 - if such search has been done, then return cached result, 1 - to do a new search |
| flags | data flags for the response (the value of this parameter depends on item type; data formats of all item types and their flags are described in the chapter Data format.) |
| from | index of the first returned item |
| to | index of the last returned item (0xffffffff - last found) |
Item types (field “itemsType”):
Properties of item (fields “propName” and “sortType”):
{ "searchSpec":{ /* search specification */ "itemsType":<text>, /* items type */ "propName":<text>, /* property name */ "propValueMask":<text>, /* property value mask */ "sortType":<text> /* property name for sorting */ }, "dataFlags":<uint>, /* applied data flags */ "totalItemsCount":<uint>, /* quantity of found items */ "indexFrom":<uint>, /* beginning index */ "indexTo":<uint>, /* ending index */ "items":[{...}] /* found items */ }
The format of “items” array depends on item type. All formats are described in the chapter Data format.
| Code | Value |
|---|---|
| 1 | invalid session |
| 2 | invalid service name |
| 3 | invalid result |
| 4 | invalid format or value of parameters |
|