Summary:
From Entuity v23.0 P02 upwards, search the StormWorks database for objects.
URL:
http(s)://{server-hostname}/api/search
Method summary
search:
- GET Method - search for objects (JSON, XML).
GET Method detail
Search the StormWorks database for objects, in either JSON or XML format.
Request parameters:
Accepts the following query attributes.
| Name | Description |
|---|---|
| pattern | search text. |
| limit | maximum number of rows in the response (default 1000) |
| type |
the type of object to search for:
|
| media | json or xml |
| regEx |
(whether to treat the pattern as a regular expression) |
| whole | true or false |
| ignoreCase | true or false |
| view | view name: Default <user>::My Network |
| serverId |
(optional) the polling server monitoring the object/device:
|
| connected | true or false (whether to search for connected hosts that are currently connected) |
Response:
| Name | Description |
|---|---|
| items |
details of the objects that meet the search criteria:
|
| count | number of objects that meet the search criteria |
Examples:
INPUT
curl -u admin:admin http://localhost/api/search?&pattern=e1234&limit=1000&type=Devices&media=json
OUTPUT
{
"items" : [ {
"source" : "e1234",
"attributes" : "Name=e1234, Polled Device Name=e1234",
"context" : "Polled IP Address=10.123.456.10",
"server" : "server1",
"serverId" : "f12349556-1234-4d65-5678-80e06be57162",
"typeName" : "RouterDevice",
"zone" : "",
"compId" : "4, 1, 0, 0",
"objId" : 714,
"views" : [ "admin::My Network", "admin::My Network/All Objects" ]
} ],
"count" : 1
}
INPUT
curl -u admin:admin http://localhost/api/search?&pattern=e2821&limit=1000&type=Devices&media=xml
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<items count="1" xmlns:ns5="http://www.entuity.com/webrpc" xmlns:ns2="http://www.entuity.com/schemas/webUI" xmlns:ns4="http://www.entuity.com/schemas/eventengine" xmlns:ns3="http://www.entuity.com/schemas/flow">
<item xsi:type="restSearchResult" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<source>e1234</source>
<attributes>Name=e1234, Polled Device Name=e1234</attributes>
<context>Polled IP Address=10.123.456.10</context>
<server>server1</server>
<serverId>f12349556-1234-4d65-5678-80e06be57162</serverId>
<typeName>RouterDevice</typeName>
<objId>714</objId>
<zone></zone>
<compId>4, 1, 0, 0</compId>
<views>admin::My Network</views>
<views>admin::My Network/All Objects</views>
</item>
</items>
Comments
0 comments
Please sign in to leave a comment.