Security

last person joined: 19 hours ago 

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

Create Entry in Endpoint Database with REST API

This thread has been viewed 6 times
  • 1.  Create Entry in Endpoint Database with REST API

    Posted Sep 16, 2015 08:25 PM

    My goal is to create profiled Endpoints for static IP devices that are not able to be profiled via, DHCP, SNMP, Device Sensor, etc...  I would like to be able to create them manually and set their device category, os family, name, etc...

     

    Is there a way to create and endpoint entry in the Database with a REST API call?   If so, can you provide some example calls with needed XML request.

     

    Any docs available on doing this?

     

    Thanks,  -- Mark Thiel



  • 2.  RE: Create Entry in Endpoint Database with REST API

    EMPLOYEE
    Posted Sep 16, 2015 08:29 PM


  • 3.  RE: Create Entry in Endpoint Database with REST API

    Posted Sep 16, 2015 08:34 PM

    Tim,  I have seen that document and used it to create python scripts for querying the endpoint database.  The document doesn't show how to create an entry, or retrieve data from existing ednpoints.  I want to create an endpoint.

     

    The document seems to be more focused on Guest accounts instead or endpoints.



  • 4.  RE: Create Entry in Endpoint Database with REST API

    Posted Sep 16, 2015 09:13 PM

    I read a profiling doc by Danny Jump and found a REST call to profile an endpoint with a call similar to the following:

     

    curl -k -X POST https://10.238.32.32/async_netd/deviceprofiler/endpoints -u apiadmin:xxxxxxx -H "Content-Type:application/json"-k-d' {"mac": "00005e000101": {"category": "Printer", "family": "Xerox", "name": "Xerox WorkCenter"}}'

     

    The POST returns a 200OK, but the endpoint category, family and name are unchanged.

     

    Any ideas?



  • 5.  RE: Create Entry in Endpoint Database with REST API

    EMPLOYEE
    Posted Sep 16, 2015 09:22 PM

    Sorry didn't realize you were trying to change the profile information. This is not currently possible via the API. You could however create a custom attribute for use with these manually added devices.



  • 6.  RE: Create Entry in Endpoint Database with REST API

    Posted Sep 16, 2015 09:29 PM

    Tim,

     

    According to Danny Jumps profiling tech note, it is possible unless I am not understanding what he has written on the last page of the document.

     

    From Danny's doc......:

     

    Manual Profile API: This API allows an admin to manually profile a given endpoint to specific device category, device family and device name. By manually profile, we mean ASSIGN the required classification to the device. This can be anything you want. Below I assign a family of ‘Future-iPhone’ under the SmartDevice category, then I call the Phone an iPhone20 to demonstrate the power of the API’s

     

    Method: POST
    URL: /async_netd/deviceprofiler/endpoints
    Value :
    {"mac" : " ",
    "device" : {
    "category": " ",
    "family": " ",
    "name": ""
    }
    }


    Example:
    CMD:
    danny-jump:~ djump$ curl -X POST
    https://10.2.100.161/async_netd/deviceprofiler/endpoints -u apiadmin:arubans123 -H
    "Content-Type: application/json" -k -d '{"mac": "00000
    0000013", "device": {"category": "SmartDevice", "family": "Future-iPhone", "name":
    "iPhone20"}}'
    <html>
    <head>
    <title>200 OK</title>
    </head>
    <body>
    <h1>200 OK</h1>
    <br /><br />
    </body>
    </html>

     



  • 7.  RE: Create Entry in Endpoint Database with REST API

    EMPLOYEE
    Posted Sep 16, 2015 09:33 PM

    I stand corrected! Thanks for the reference!

     

    When you do the API call, do you see anything in audit viewer reflecting the endpoint change?



  • 8.  RE: Create Entry in Endpoint Database with REST API

    Posted Sep 16, 2015 09:48 PM

    Nothing showing up in Event viewer.  Makes me wonder if the API call syntax is correct?  That is what I need help with.  I may open a TAC case tomorrow to ask for assistance on this.  

    I want to do 2 things:

    1.  Create a endpoint entry (new mac address)

    2.  Assign Profile attribute values (category, family, name)

     



  • 9.  RE: Create Entry in Endpoint Database with REST API
    Best Answer

    Posted Sep 21, 2015 03:03 PM

    Here is the proper syntax to create/modify an endpoint's category, os family and name.

     

    curl -X POST http://<ip address>/async_netd/deviceprofiler/endpoints -u apiadmin:<password> -H "Content-Type: application/json" -d '{"mac": "00105e0001af", "device": {"category": "Printer", "family": "Xerox", "name": "Xerox WorkCenter"}}'

     

    You can set the values to anything needed.