Hello!
I looked around the forums and haven’t seen anything similar to the issue I’m facing, so hopefully this post isn’t redundant.
I wrote some automation a couple of years ago which programmatically provisioned PMP450 radios out of our billing system using the cnMaestro v1 API devices endpoint, and it was set off to the side until now.
I have been testing to re-validate the workflow now that we’re actually getting around to deploying the solution and found that the v1 API is now deprecated, so I advanced to using the v2 tag - generally speaking this hasn’t resulted in any changes except in the PUT verb for devices, i.e. https://cnmaestro.example.net/api/v2/devices/{mac}
In the v1 API I make a call like:
>>> json = {'name': 'tower-router-test-esm', 'template': 'PMP450-57-nat', 'variables': {'QOS_SUST_DNLINK_RATE': '12000', 'QOS_SUST_UPLINK_RATE': '2000', 'QOS_DNLINK_BURST': '540000', 'QOS_UPLINK_BURST': '2000', 'QOS_MAX_DNLINK_RATE': '18000', 'QOS_MAX_UPLINK_RATE': '2000', 'HI_PRIO_DL_CIR': '0', 'HI_PRIO_UL_CIR': '0', 'SITE_NAME': 'tower-router-test-esm', 'COLOR_CODE_1': '47'}}
>>> headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'Authorization': connector['BEARER_TOKEN']
}
>>> res = requests.put(
'https://cnmaestro.example.net/api/v1/devices/{}'.format('0A:00:3E:12:34:56'),
json=json,
headers=headers
).json()
and receive a success reply from cnMaestro like:
>>> res
{'message': "Job created successfully. Please check the job's status for details.", 'job_id': 'afb2da5e-8502-4578-8096-6694b81f7688', 'state': 'started', 'deprecation': {'message': 'The v1 version of this API is deprecated and must be changed to v2.', 'sunset': '3.2.0', 'specification': 'https://docs.cloud.cambiumnetworks.com/api/3.0.0/announcements.html'}}
and I can then view the job in the cnMaestro UI and watch the settings be pushed successfully to the radio - works great and as expected.
However, if I simply update that request to the v2 API I instead receive the following very skimpy reply:
>>> res
{'message': 'Success'}
and then nothing happens - no job is scheduled, no changes are applied to the radio, etc.
The swagger documentation is, let’s be honestly, extraordinarily slim and doesn’t cover optional parameters whatsoever, and there isn’t anything in the cnMaestro user guide about programmatically applying configuration templates through the API either - everything is geared towards manually doing things in the UI.
Was this configuration template feature nerfed via the API, was the request inherently changed, is there a paywall to doing this now? I have been through change announcements for cnMaestro 3.0.0 + and haven’t seen a note about operational changes to this action and am thoroughly confused at this point. Something has obviously changed, I just don’t know if it’s intentional or not or how I can resolve this issue.
Thank you!
Jacob Barnard