I'm attempting to grab the public IP address off of a few interfaces for a specific networks in our organization but I'm struggling to get this completed.
I'm using the /appliance/uplink/statuses call and trying to filter by network using ?networkIds= but I'm clearly not doing something correct with my call.
$endpoint = "https://api.meraki.com/api/v1/organizations/$orgID/appliance/uplink/statuses?networkIds=**NetworkID**"
Invoke-RestMethod -Method GET -Uri $endpoint -Headers $header
This is just returning Invoke-RestMethod : The remote server returned an error: (400) Bad Request.
Would anyone be able to assist with this issue?
Solved! Go to solution.
Tested and the endpoint is working :
networkIds[]= XXXXXXXXXXXX ( it is an array )
networkIds is an array, do you send the data appropriate?
As of right now I just have one network ID listed in there
Example:
$endpoint = 'https://api.meraki.com/api/v1/organizations/123456/appliance/uplink/statuses?networkIds=L_1234567890'
You still have to convert it, you are not allowed to send the single network ID as a string.
This is how I do it with the API:
uplinks = dashboard.appliance.getOrganizationApplianceUplinkStatuses(
org_id, networkIds = net_id.split(), total_pages="all")
net_id is a single network which I first convert to the list that is sent to the API.
Tested and the endpoint is working :
networkIds[]= XXXXXXXXXXXX ( it is an array )