날짜: 05-08-2025 02:05 PM
Hello,
I am having some serious trouble getting the vpn exclusion rules for a single network or few in my organization.
I keep getting the error networkIds must be an array and I have tried any suggestion I have found to fix with no better results.
I am regularly using v1 and postman API v1.58, your help would be appreciated.
See example below:
해결되었습니다! 솔루션으로 이동.
날짜: 05-08-2025 02:34 PM
Arrays in REST calls have an annoying syntax. Did you try this?
날짜: 05-08-2025 02:34 PM
Arrays in REST calls have an annoying syntax. Did you try this?
날짜: 05-15-2025 02:35 PM
Hello, thank you. that worked perfectly. here is the code that worked for me for reference
# Set up headers correctly for Meraki API authentication
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$headers.Add("Accept", "application/json")
$headers.Add("X-Cisco-Meraki-API-Key", "YOURAPIKEY") # Replace with actual API key
# Define the API URL with proper query parameters
$networkId = "L_XXXX"
$organizationId = "XXXXXX"
$apiUrl = "https://api.meraki.com/api/v1/organizations/$organizationId/appliance/trafficShaping/vpnExclusions/byNetwork?networkIds[]=$networkId"
# Make the GET request
try {
$response = Invoke-RestMethod -Uri $apiUrl -Method 'GET' -Headers $headers
$response | ConvertTo-Json -Depth 3 # Convert response to JSON format for readability
} catch {
Write-Host "Error occurred: $_"
}
날짜: 11-05-2025 06:09 AM
Well that was an annoying 30 mins. Thanks for the link.
날짜: 05-08-2025 07:45 PM
networkIds[]=xxxxxxxxx should be the parameter
새로운 아이디어를 발견하고 저장하세요. 전문가 답변, 단계별 가이드, 최근 주제 등 다양한 내용을 확인해 보세요.
처음이신가요? 아래 팁들을 확인해 보세요. 시스코 커뮤니티 사용하기 새 멤버 가이드