I can't find any docs about that value being available via API. Make a wish!
Maybe this helps though, you might be able to reuse some of this code:
https://github.com/meraki/spark-operations-bot/blob/master/meraki_dashboard_link_parser.py
Seems like the following python function with settingval set to ng_id will get you the value.
def meraki_www_get_settings(strcontent, settingval, settingfull):
'''
In the dashboard, there are a large number of settings hidden in the code. This function will parse and retrieve
the value of a specific setting
:param strcontent: String. Raw HTML of the page.
:param settingval: String. If the setting is in the "Mkiconf.setting = " format, pass "setting" here. Otherwise...
:param settingfull: String. If the setting is named or punctuated differently, pass the exact string here.
:return: String. The value of the requested setting
'''