A bit surprising that the first API call I ran in Meraki gave me trouble.
I requested my organizations from /organizations, and I got back something like this:
This was noted and we are investigating the best way to address the issue. Essentially, the organization ID should be a String but is being sent as a Number.
If we switch the type, it's technically a breaking change. That being said, it doesn't do you much good if the number is getting mangled by JavaScript.
Stay tuned for updates on this.
FWIW, I have used json-bigint in the past to parse the JSON as a workaround.
You could add a second field id_str, which would avoid a breaking change.
At the moment I'm pulling the id out with a regex, which has got me going for now.
Apologies for the dumb question, but how would I be able to implement the second field "id_str" ?
Should I add it as a variable?
Should I add it somewhere else?
total new guy at Postman and running into this rounding issue.
const idMatches = allMatches(/"id":(\d+)/g, body); return JSON.parse(body).map((org, i) => ({ id: idMatches[i][1], name: org.name, }));
We plan to fix the incorrect type returned in the `/organizations` response. This was the only place where this ID appeared as a `number`. It was stated in our documentation that the org ID and all other IDs should be treated as a strings, but this ID was a little ambiguous with the JSON response.
This should not break any normal code, as long as you ultimately used the org ID as a string. Stay tuned, for an update shortly. Once it's implemented, we will make an announcement in this community.
This is being fixed. Please refer to this post for more details.