Cloud Managed Networks

 View Only
  • 1.  Central API to  turn off/on poe from interfaces...

    Posted 17 days ago

    Hello,

    I have done web applications utilizing cx own api to my clients NOT using Central to turn off/on poe devices (speakers, video converters etc...) easily by turning off poe from switch ports directly from WebUI.
    Application works well but now I need to do same with switches controlled by Central... Switches local API gives http 403 if tried to turn poe on/off while device is under Central lockout so need to use Central API.

    CNX API  is working but issues are in Classic side. Cannot find proper end points to configure interfaces from there..

    Any tips where can I find switch port configuration end points?



    ------------------------------
    Regards
    Jori Luoto / RockNET
    ------------------------------


  • 2.  RE: Central API to  turn off/on poe from interfaces...

    Posted 17 days ago

    That 403 is expected, and Central is the only way in. A CX switch on 10.07 or later in a Classic Central group runs in Central managed mode. The Classic Central guide (Getting Started with AOS-CX Deployments, AOS-CX Switch Configuration section) says Central is then the single source of config and switch REST is locked out.

    The catch: as far as I know, Classic's public API has no per-port interface or PoE write endpoint for CX in UI groups. That config is UI and MultiEdit only. The PoE bounce action power-cycles a port but can't leave it off. What does work is a template group. Under interface 1/1/5 put %if p5_poe=off%, then no power-over-ethernet, then %endif%, and have your app change that device's template variables (I believe the path is /configuration/v1/devices/{serial}/template_variables, check it in API Gateway). Each change pushes the whole template, so try it on one switch first.

    Or move those switches to new Central, where your CNX calls already work.



    ------------------------------
    Dustin Burns
    @Worldcom Exchange, Inc.
    www.wei.com

    - - -
    The comments I post here are my own, and not my employers
    If my post was useful accept solution and/or give kudos
    Personal Blog: www.networkfieldnotes.com
    - - -
    ------------------------------



  • 3.  RE: Central API to  turn off/on poe from interfaces...

    Posted 16 days ago

    I was aware of config lockout and just point it out to drop recommends to use local rest ;)

    Okay so my findings (or non-findings) were right... Using of templates are also out-of-bounds because client want to have possibility to change vlans to ports, quoting their words "decent way" and template approach is miles away from "decent".

    Quick change to CNX is not really possible either at the moment mainly because lack of features in UI and not have possibility to inject configurations permanently to switches (I heard in autumn 2024 that configuration module might be coming available that allows for the input of CLI configurations inject to switches but no one has heard of it since)

    Another downside seems to be the fact that "Monitor only"-mode has dropped off from Central which leads to discussions with clients what they want to do to do after licenses expires...



    ------------------------------
    Regards
    Jori Luoto / RockNET
    ------------------------------