I’m hitting an issue updating a network via API. All the JSON fields seem to work and update correctly except for the “sites” setting, where the UI doesn’t show the group that should have access is checked to have access.
The API docs show the format of the JSON payload as:
payload = { "network": {
"visibility": "private",
"resourcePermissions": {
"all": False,
"sites": [2]
},
"cidr": "127.0.0.0/24",
"gateway": "127.0.0.1",
"dnsPrimary": "8.8.8.8",
"dnsSecondary": "8.8.4.4,
"vlanId": 9,
"pool": 15886,
"allowStaticOverride": False,
"active": True,
"dhcpServer": False,
"applianceUrlProxyBypass": True,
"tenants": [{ "id": 1 }]
} }
What I’m sending is:
{ 'network': {
'visibility': 'private',
'tenants': [{'id': 1}],
'resourcePermissions': {
'all': False,
'sites': [2]
},
'pool': 15886,
'displayName': None,
'cidr': '172.0.0.0/24',
'gateway': '172.0.0.1',
'dnsPrimary': '8.8.8.8',
'dnsSecondary': '8.8.4.4',
'vlanId': 9,
'allowStatisOverride': False,
'active': True,
'dhcpServer': False,
'searchDomains': None,
'applianceUrlProxyBypass': True
}
}
I’m not sure what I’m missing on why the actual group access isn’t adjusting. The “ALL” goes depending on if I set that True or False, but even leaving that out the Sites values don’t get updated.
Can you tell me what I’m missing/doing wrong? I’m hoping to have this ready by this afternoon to migrate some things, duplicating permissions and settings from existing networks, but this group part is being a pain.