Developer

 View Only
last person joined: 8 days ago 

Expand all | Collapse all

Central API endpoint for device inventory not working

This thread has been viewed 13 times
  • 1.  Central API endpoint for device inventory not working

    Posted Mar 03, 2023 07:46 AM

    Hi all,

    I want to get my device inventory from the Central API by using this endpoint:

    https://developer.arubanetworks.com/aruba-central/reference/acp_servicenb_apiapidevice_inventoryget_devices

    My request body looks like this:

    body = {
    'sku_type': 'all_ap',
    }

    But when I send it, I get error 500 INTERNAL_SERVER_ERROR

    Any ideas?


    ------------------------------
    Thanks,
    Bjarne
    ------------------------------



  • 2.  RE: Central API endpoint for device inventory not working

    Posted Mar 06, 2023 07:48 AM

    Valid device types are: "iap", "switch" or "Gateway".

    So in your case, you should use iap instead of all_ap.

    --Rob




  • 3.  RE: Central API endpoint for device inventory not working

    Posted Mar 06, 2023 09:06 AM

    Hi Rob,

    thanks for the answer. In the documentation it says

    string required: "iap/switch/controller/gateway/vgw/cap/boc/all_ap/all_controller/others"

    I tried all of those and always get an error 500.

    Does it work for you?



    ------------------------------
    Thanks,
    Bjarne
    ------------------------------



  • 4.  RE: Central API endpoint for device inventory not working

    Posted Mar 06, 2023 10:06 AM

    It does.  Here is an example of a gateway:

     

    Resp example:

    {'code': 200,

    'msg': {'devices': [{'aruba_part_no': '<omitted>',

                          'customer_id': '<omitted>',

                          'customer_name': '<omitted>',

                          'device_type': 'GATEWAY',

                          'imei': <omitted>,

                          'macaddr': '<omitted>',

                          'model': '<omitted>',

                          'serial': '<omitted>',

                          'services': ['<omitted>'],

                          'tier_type': '<omitted>'}],

             'total': <omitted>}}

     

    Was able to pull a gateway just fine.  Sorry had to omit almost all the data.

    --Rob