Developer

 View Only
last person joined: 2 hours ago 

Expand all | Collapse all

REST API return device or config not found on config endpoint

This thread has been viewed 31 times
  • 1.  REST API return device or config not found on config endpoint

    Posted Jul 24, 2023 01:37 PM

    Hello,

    I have an Aruba 6100 switch.  There's nothing special about it.  I has the defaul config and I create an additional VLAN, assigned ports and changed it's name.  But, when I used the /configuration/v1/devices/<device-serial>/configuration endpoint, it comes up with "Device <device-serial> or its configuration not found" error.  Other devices in the same customer group work fine.  I only have the one switch, so can't compare it to another.

    The device is listed when I pull a set of all devices.  That's how I found it.. I got all the devices and then iterated over it to get the current running config.

    I'm sure I'm doing something silly or just am misunderstanding something.  Any help welcome.

    Thanks!



  • 2.  RE: REST API return device or config not found on config endpoint

    Posted Jul 25, 2023 01:52 PM

    Hello @marclallen@marclallen

    How are you managing the switch config? UI group or Template group? 

    To use the Configuration>Devices endpoint (/configuration/v1/devices/{device_serial}/configuration) you'll need to be managing the switch config using Template groups - if you're using UI groups to configure the VLANs/interfaces, the API for UI Group config pull is limited - you're going to want to use the endpoint under Configuration > CX Configuration and there you'll find endpoints to retrieving specific values of the switch config that's been managed by Central. This API is allow listed though so if you don't have access you'll want to reach out to your SE to get it approved for your account.



    ------------------------------
    Ti Chiapuzio-Wong (they/them)
    HPE Aruba Networking
    ------------------------------



  • 3.  RE: REST API return device or config not found on config endpoint

    Posted Jul 25, 2023 02:44 PM

    Thanks for getting back to me.

    According to the API specs, the /configuration/vi/devices/{device_serial}/configuration returns the last known running config.  Why does that have anything to do with the type of group it is involved with?  I want the current running config regardless.

    Also, there is a /configuration/v1/devices/{device_serial}/config_details that, according to the API specs, is used to "Get configuration details for a device (only for template groups)."

    I'll double check this, but I don't believe I have any issues with obtaining device configuration for AP devices, and I don't think they use template groups either.

    So, are you sure about that?




  • 4.  RE: REST API return device or config not found on config endpoint

    Posted Jul 25, 2023 05:47 PM

    Unfortunately, that API is not fully available for CX switches at this moment. The behavior you see regarding Access Points is not one to one with what we see supported with AOS-CX. We are working on improving the API support for CX switches on Central in the upcoming versions. 



    ------------------------------
    Ti Chiapuzio-Wong (they/them)
    HPE Aruba Networking
    ------------------------------



  • 5.  RE: REST API return device or config not found on config endpoint

    Posted Jul 26, 2023 08:37 AM

    I've since discovered that AOS-CX is specific to switches.  I'm sorry I didn't know that earlier.  I'm sure that has led to confusion on my part and resulting in some strange questions. 

    I''ve got a link to the API docs involved and I'll try to get it all clear.  Thanks for your help.