Avatar

How to Search by Group?

0

How do I search by group along with fromDate? No mater which groupId I supply, I get all groups returned. Here is my code in JSON (I'm using Python). I've tried using both "device" and "deviceSearch" within the search object. What am I doing wrong? Thank you.

 

{
            "method" : "Get",
            "params" : {
                        "typeName" : "LogRecord",
                        "search": {
                                    "fromDate" : "2016-09-18",
                                    "device": {
                                        "groups": [{
                                            "id": "b2792"
                                        }]
                                       
                                    }
            
                                  },
                        "credentials": {
                                        "database" : "xxxx",
                                        "userName" : "xxxx",
                                        "password" : "xxxx"
                                       }                    
                       }
            }

russ

Please sign in to leave a comment.

6 comments

0
Avatar

Russ,

Unfortunately, LogRecord does not support search by groups.

Below is the list of available search options:

logrecord.png

 

In addition, when dealing with Log Record the most efficient way of retrieving data is by use of the GetFeed. Could you explain your use case?

Thanks.

Mauricio Muniz 0 votes
0
Avatar

Thank you. In the description of deviceSearch, "DeviceSearch" is a hyperlink. When I click it, the DeviceSearch object indicates that is has a groupSearch. The implication being that the LogRecord's deviceSearch can contain a groupSearch. Is that not the case?

 

Thanks again.

russ 0 votes
0
Avatar

Russ,

That is not the case. As stated in the reference I highlighted: "Available DeviceSearch options are: Id" 

Apologies for the confusion.

Mauricio Muniz 0 votes
0
Avatar

Okay thanks. So that means: of all the properties of a DeiviceSearch (groups, serial number, etc.) only Id is available for passing to a LogRecordSearch.

russ 0 votes