Security

last person joined: yesterday 

Forum to discuss Enterprise security using HPE Aruba Networking NAC solutions (ClearPass), Introspect, VIA, 360 Security Exchange, Extensions, and Policy Enforcement Firewall (PEF).
Expand all | Collapse all

REST API JSON filter not working 6.6.2

This thread has been viewed 2 times
  • 1.  REST API JSON filter not working 6.6.2

    Posted Nov 10, 2016 03:20 PM

    So I want to query for a specific device mac. In the API explorer I create a json filter '{"mac":"xx-xx-xx-xx-xx-xx"}' and this works. In the return I see the create_time field is

    "create_time": 1478804392  

     So I create a filter '{"mac":"xx-xx-xx-xx-xx-xx","create_time":"1478804392"}'

     

    And this does not work. Is something wrong with my syntax? I should be able to do a multi-field query correct? I've also tried the query without the quotes around the time stamp but that doesn't work either.



  • 2.  RE: REST API JSON filter not working 6.6.2

    EMPLOYEE
    Posted Nov 10, 2016 03:25 PM

    Try removing the quotes around the create_time value:

     

    {"mac":"xx-xx-xx-xx-xx-xx","create_time":1478804392}



  • 3.  RE: REST API JSON filter not working 6.6.2

    Posted Nov 10, 2016 03:32 PM

    Thanks, but that didn't work either. I tried a query with only the create_time and that didn't work either. I did a query with the start_time though and that worked. It looks like it might be just something with the create_time field itself.



  • 4.  RE: REST API JSON filter not working 6.6.2

    EMPLOYEE
    Posted Nov 10, 2016 04:00 PM
    When you do a GET, is that attribute returned?


  • 5.  RE: REST API JSON filter not working 6.6.2

    Posted Nov 10, 2016 04:04 PM

    @cappalli wrote:
    When you do a GET, is that attribute returned?

    Yes.



  • 6.  RE: REST API JSON filter not working 6.6.2

    EMPLOYEE
    Posted Nov 10, 2016 07:46 PM
    Just out of curiosity, why do you need to filter on both of those attributes
    simultaneously? There can only be one account in the database with a
    particular username.


  • 7.  RE: REST API JSON filter not working 6.6.2

    Posted Nov 11, 2016 08:38 AM

    @cappalli wrote:
    Just out of curiosity, why do you need to filter on both of those attributes
    simultaneously? There can only be one account in the database with a
    particular username.

    I was just testing. What I really want to do is return all devices that were created before a certain date. Like I said I did the query with just the create_time and it didn't work either. I think I'll open a TAC case and see if they can recreate the issue. I can do the date checking within my script if I need to for now.



  • 8.  RE: REST API JSON filter not working 6.6.2
    Best Answer

    Posted Nov 22, 2016 11:03 AM

    I opened a case with the TAC and they confirmed the issue was happening on their server. They will open a ticket with engineering to look into it.


    @miker wrote:

    I was just testing. What I really want to do is return all devices that were created before a certain date. Like I said I did the query with just the create_time and it didn't work either. I think I'll open a TAC case and see if they can recreate the issue. I can do the date checking within my script if I need to for now.