Here is a quick and dirty python script. It will collect inventory data from central and return AP details with Subscription keys in CSV format.
To run it you need to have pycentral installed.
Update dictionary central_info with your central account info.
Then you can easily manipulate csv file.
Original Message:
Sent: Jul 18, 2024 04:35 AM
From: TylerWayne
Subject: how to get subscription key of device by device_serial
Thank you very much for your answer. It is too complicated for me to directly obtain the inventory device list, but I can't find a more suitable API.
Original Message:
Sent: Jul 17, 2024 04:42 AM
From: GorazdKikelj
Subject: how to get subscription key of device by device_serial
pycentral module licensing has function Subscription and it will return subscription keys. Module device_inventory has a function that will return device inventory with subscription keys.
You can also use direct url to get the same data:
/platform/device_inventory/v1/devices?limit=100&sku_type=all
Then it is just a simple search over serial number or device name to get subscription key assigned to it.
Best, Gorazd
------------------------------
Gorazd Kikelj
MVP Guru 2024
Original Message:
Sent: Jul 16, 2024 11:43 PM
From: TylerWayne
Subject: how to get subscription key of device by device_serial
I'm sorry, my English is very poor and you may misunderstand me. I just want to know the information about the subscription key of a device.
十分抱歉,我的英文非常差,让你产生了误解。我只是想知道某个设备的订阅钥匙的相关信息。
Original Message:
Sent: Jul 16, 2024 10:39 AM
From: cordless
Subject: how to get subscription key of device by device_serial
Assigning a Device Serial to a dedicated Subscription Key is not available as of today. But that is somthing that is comming.
Original Message:
Sent: Jul 16, 2024 07:41 AM
From: TylerWayne
Subject: how to get subscription key of device by device_serial
I find this api to get my all subscriptions key
curl --location 'https://api-ap.central.arubanetworks.com/platform/licensing/v1/subscriptions' \--header 'Accept: application/json'
but it's impossible to asscoicate these keys with devices.