Dear Community, can you please advice how MSP could retrieving license expiration date across all organisation in MSP ?
1. Turn on API for all organizations, manually.
2. Generate API key.
3. Get list of orgs that your API key has access to.
4. Build list that correlates org names and org numbers. I like objects in Python for this.
5. Write each org name and each org's results of "Return license state for organization" to a file.
6. Celebrate!
Dear Team, would you by any chance have working sample for point 3, 4 and 5 ?
Getting the list of organizations you have API access to can be done through a GET to https://api.meraki.com/api/v0/organizations. This will also give you the organization names and IDs. By doing a GET to https://api.meraki.com/api/v0/organizations/[id]/licenseState you can get the license expiration date. The field is expirationDate.
I have a script that does pretty much all of this, and a whole lot more, but it is too long to just post. If you are still having problems with this, I can whip up a quick and dirty Python script that will give you the information.
Getting the list of organizations you have API access to can be done through a GET to https://api.meraki.com/api/v0/organizations. This will also give you the organization names and IDs. By doing a GET to https://api.meraki.com/api/v0/organizations/[id]/licenseState you can get the license expiration date. The field is expirationDate.
I have a script that does pretty much all of this, and a whole lot more, but it is too long to just post. If you are still having problems with this, I can whip up a quick and dirty Python script that will give you the information.
Not at the moment. I have wanted access to that information too. I have a script that builds a spreadsheet for each organization that looks a lot like the page you get when you pull up the license information in the dashboard. The data about the license status and the counts you can get from the call I referenced before. The actual license keys displayed under License History is not. I have send multiple wishes for access to this information.