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- - -
------------------------------