Security

Reply
Frequent Contributor I

ClearPass API - Get Endpoint lists and filter based on endpoint attributes

Hello community,

I'm playing around with ClearPass API Explorer, and what I'm trying to do is to get a list of endpoints in my endpoint repository, and filter the result using endpoint attributes. The sample data for an endpoint looks like this:

 

"_embedded": {
    "items": [
      {
        "id": 3004,
        "mac_address": "f822934bb108",
        "status": "Known",
        "attributes": {
          "Owner": "user1@example.com",
          "social_vip": "",
          "Device IMEI": "01 374800 460669 4",
          "Device Name": "iOS",
          "Device Type": "iOS",
          "Device UDID": "50e082617c1c07c25dd12706b79be6a",
          "Product Name": "iPhone6,1",
          "social_roles": "[]",
          "social_groups": "[]",
          "social_userType": "Member",
          "social_username": "user1@example.com",
          "social_timestamp": "1512108128",
          "social_objectType": "User"
}
]
}

I can filter the result based on an endpoint's MAC address by specifying this syntax in the filter box:

 

{"mac_address": "<mac address>"}

But when I tried to filter based on associated attributes of an endpoint using this syntax:

 

{"attributes": {"social_username": "user1@example.com"}}

it failed, and the API Explorer responded with code 422 which said invalid filter expression. So I know my filter syntax for endpoint attributes was not correct, but how should I configure it then?

 

Thank you,

Guru Elite

Re: ClearPass API - Get Endpoint lists and filter based on endpoint attributes

You cannot filter on attributes today.

Tim Cappalli | Aruba Security TME
@timcappalli | timcappalli.me | ACMX #367 / ACCX #480
Frequent Contributor I

Re: ClearPass API - Get Endpoint lists and filter based on endpoint attributes

Thanks Tim for your quick reply. I'll try a different solution then.

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: