cancel
Showing results for 
Search instead for 
Did you mean: 

Bug Fix: Organization ID type as string

Meraki Employee

Bug Fix: Organization ID type as string

 

Date of Change: 24 June 2019 [updated]

Endpoint Affected:   /organizations

 

Dashboard API uses various IDs both in the path and in the response bodies. Each ID should always be treated as a string even if the value only consists of numbers. This is detailed in our documentation.

 

The endpoint to return a list of organizations as well as create, update and delete, did not explicitly set the ID value as a string and this may cause issues with parsing the JSON properly in certain application languages. For example, this was commonly observed with JavaScript, where the default parser would interpret the value as a number, rounding the large ID number to an integer, causing the ID to change in value and no longer keeping the identifier exact.

 

On Monday, June 24th (updated from June 17th), Meraki will be making a change to address this issue by modifying the endpoint, wrapping the ID value in double quotes to ensure proper parsing.

 

Example of how JSON parsing would interpret the ID value:

 

Before Fix

 

 

[
 {
   "id": 643451796760550000,
   "name": "My organization"
 }
]

 

After Fix

 

 

[
 {
   "id": "643451796760551234",
   "name": "My organization"
 }
]

 



PLEASE NOTE

If you have written a custom workaround to the previous behavior, you may want to revisit that code. If you were using the popular Node module json-bigint, your code should continue to work as expected.

1 REPLY 1
Kind of a big deal

Re: Bug Fix: Organization ID type as string

Good to hear!

Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.