cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1927
Views
2
Helpful
2
Replies

problem filtering ClientDetails by macAddress

Team, why is filtering by macAddress not working for me below? This is with PI 3.0

[nbrunsga@localhost ~]$ curl -k -u user:password  "https://10.195.136.101/webacs/api/v2/data/ClientDetails?macAddress=64:76:ba:e9:05:2b"

<?xml version="1.0" ?>

<errorDocument>

  <httpResponseCode>400</httpResponseCode>

  <httpMethod>GET</httpMethod>

  <message>Bad or missing filter property value [64:76:ba:e9:05:2b] for property [macAddress] on entity [ClientDetailsV2].-PRS-113</message>

  <id>presentation.PRS-113</id>

  <uriPath>data/ClientDetails</uriPath>

  <queryParams>{macAddress=[64:76:ba:e9:05:2b]}</queryParams>

</errorDocument>

[nbrunsga@localhost ~]$ curl -k -u user:password  "https://10.195.136.101/webacs/api/v2/data/ClientDetails?ipAddress=10.194.205.176"

<?xml version="1.0" ?>

<queryResponse type="ClientDetails" rootUrl="https://10.195.136.101/webacs/api/v2/data" requestUrl="https://10.195.136.101/webacs/api/v2/data/ClientDetails?ipAddress=10.194.205.176" responseType="listEntityIds" count="1" first="0" last="0">

  <entityId url="https://10.195.136.101/webacs/api/v2/data/ClientDetails/940401" type="ClientDetails">940401</entityId>

</queryResponse>[nbrunsga@localhost ~]$

[nbrunsga@localhost ~]$ curl -k -u user:password  "https://10.195.136.101/webacs/api/v2/data/ClientDetails/940401"

<?xml version="1.0" ?>

<queryResponse type="ClientDetails" rootUrl="https://10.195.136.101/webacs/api/v2/data" requestUrl="https://10.195.136.101/webacs/api/v2/data/ClientDetails/940401" responseType="getEntity">

  <entity url="https://10.195.136.101/webacs/api/v2/data/ClientDetails/940401" type="ClientDetails" dtoType="clientDetailsDTO">

    <clientDetailsDTO id="940401" displayName="940401">

      <apIpAddress>

        <address>10.129.16.78</address>

      </apIpAddress>

      <apMacAddress>70:10:5c:1e:db:20</apMacAddress>

      <apName>Boulder-2</apName>

      <apSlotId>1</apSlotId>

      <associationTime>1448963525780</associationTime>

      <authenticationAlgorithm>OPENSYSTEM</authenticationAlgorithm>

      <ccxFSVersion>V1</ccxFSVersion>

      <ccxLSVersion>V1</ccxLSVersion>

      <ccxMSVersion>V1</ccxMSVersion>

      <ccxVSVersion>V1</ccxVSVersion>

      <ccxVersion>UNSUPPORTED</ccxVersion>

      <clientAaaOverrideAclApplied>NA</clientAaaOverrideAclApplied>

      <clientAclApplied>NA</clientAclApplied>

      <clientApMode>UNKNOWN</clientApMode>

      <clientInterface>svmdata</clientInterface>

      <connectionType>LIGHTWEIGHTWIRELESS</connectionType>

      <deviceIpAddress>

        <address>10.194.205.53</address>

      </deviceIpAddress>

      <deviceName>sjc29-wlc2-bottom</deviceName>

      <deviceType>none</deviceType>

      <eapType>PEAP</eapType>

      <encryptionCypher>CCMPAES</encryptionCypher>

      <firstSeenTime>1448373076952</firstSeenTime>

      <hreapLocallyAuthenticated>2</hreapLocallyAuthenticated>

      <ifIndex>0</ifIndex>

      <ipAddress>

        <address>10.194.205.176</address>

      </ipAddress>

      <ipType>IPV4</ipType>

      <location>System Campus &gt; Cisco Boulder &gt; Floor2</location>

      <macAddress>64:76:ba:e9:05:2b</macAddress>

      <mobilityStatus>LOCAL</mobilityStatus>

      <nacState>ACCESS</nacState>

      <policyType>WPA2</policyType>

      <policyTypeStatus>NOMETHOD</policyTypeStatus>

      <postureStatus>UNKNOWN</postureStatus>

      <protocol>DOT11N5GHZ</protocol>

      <securityPolicyStatus>PASSED</securityPolicyStatus>

      <speed>UNKNOWN</speed>

      <ssid>Boulder</ssid>

      <status>ASSOCIATED</status>

      <updateTime>1448963525983</updateTime>

      <userName>nbrunsga</userName>

      <vendor>Apple</vendor>

      <vlan>201</vlan>

      <webSecurity>DISABLED</webSecurity>

      <wepState>ENABLED</wepState>

      <wgbMacAddress>00:00:00:00:00:00</wgbMacAddress>

      <wgbStatus>REGULARCLIENT</wgbStatus>

      <wiredClientType>NA</wiredClientType>

    </clientDetailsDTO>

  </entity>

</queryResponse>

Message was edited by: Spencer Zier

2 Replies 2

Spencer Zier
Cisco Employee
Cisco Employee

Wrap the mac address in double quotes.  So instead of macAddress=64:76:ba:e9:05:2b you should have macAddress="64:76:ba:e9:05:2b" and since you're using cURL you'll want to escape the quotes, so macAddress=\"64:76:ba:e9:05:2b\"

Also, I edited your post to remove the username and password from your examples.  Be sure to change your password just in case.

Jean Matthew
Level 1
Level 1

you could also try surrounding the mac address with %22