The Meraki Community
Register or Sign in
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • About MarkD_BT
MarkD_BT

MarkD_BT

Getting noticed

Member since Dec 8, 2017

‎11-26-2021
Kudos from
User Count
Erick31
Erick31
1
5ghz
5ghz
2
ThatoneITguy
ThatoneITguy
1
CBurkhead
CBurkhead
1
Namgyu
Namgyu
1
View All

Community Record

38
Posts
21
Kudos
2
Solutions

Badges

ECMS1
CMNO
1st Birthday
First 5 Posts
First 10 Kudos
First Solution View All
Latest Contributions by MarkD_BT
  • Topics MarkD_BT has Participated In
  • Latest Contributions by MarkD_BT

Re: Find a client in multiple network ID's

by MarkD_BT in Developers & APIs
‎09-27-2021 07:49 AM
1 Kudo
‎09-27-2021 07:49 AM
1 Kudo
 as sungod stated. I have achieved this but is a very long winded process depending on how many sites and users you have.   parse all networks then iterate through each network to pull back the clients on a network    https ://api.meraki.com/api/v1/networks/{networkId}/clients   You can add timescales onto this with appending  something like the following on the url to set a time scale below brings back a 1000 user's per site for the last 5 hours. ?timespan=18000&perPage=1000   add the results into a variable to either filter on what your looking for or output to a csv to then query from the spreadsheet. I've found searching against Mac address easiest but getting harder to use mac with randomised mac's ... View more

Re: Update multiple devices in different networks

by MarkD_BT in Developers & APIs
‎11-27-2019 06:57 AM
‎11-27-2019 06:57 AM
@5ghz  Hi,   You still needing help with this i've not been online for a while and been busy but will have a bit time soon if your still needing some pointers. ... View more

Re: which parameters in an API call are required

by MarkD_BT in Developers & APIs
‎09-27-2019 06:50 AM
‎09-27-2019 06:50 AM
hi @sebas  We dont have any acl's on our switchports here as only used for Meraki Ap's. With my quick testing of the Update port API it was throwing error's. So doing some testing of the different parameters I saw that having the following in macWhitelist stickyMacWhitelist stickyMacWhitelistLimit Caused these errors so i just stripped the entries out as wasn't required. Not really looking into why these were causing a error. More than likely a formatting thing. I don't need to use it at the moment so wasn't really worried about it yet 😄 ... View more

Re: which parameters in an API call are required

by MarkD_BT in Developers & APIs
‎09-27-2019 04:25 AM
‎09-27-2019 04:25 AM
@sebas    No problems glad you got it sorted.   ... View more

Re: which parameters in an API call are required

by MarkD_BT in Developers & APIs
‎09-26-2019 08:22 AM
‎09-26-2019 08:22 AM
@sebas    Sorry not in the office today so not been at my machine quick dirty way to solve your issue would to do this it's how your defining your parameters where it's causing the issue would have to look into (google) how you can set the value there as a true null.   $body = @{ "name" = $name "tags" = $tags "enabled" = $enabled "type" = $type "vlan" = $vlan "voiceVlan" = $null "allowedVlans" = $allowedVlans "poeEnabled" = $poeEnabled "isolationEnabled" = $isolationEnabled "rstpEnabled" = $rstpEnabled "stpGuard" = $stpGuard #"accessPolicyNumber" = $accessPolicyNumber "linkNegotiation" = $linkNegotiation #"portScheduleId" = $portScheduleId "udld" = $udld #"macWhitelist" = $macWhitelist #"stickyMacWhitelist" = $stickyMacWhitelist #"stickyMacWhitelistLimit" = $stickyMacWhitelistLimit } | ConvertTo-Json     ... View more

Re: which parameters in an API call are required

by MarkD_BT in Developers & APIs
‎09-26-2019 12:47 AM
‎09-26-2019 12:47 AM
Hi @sebas   I Use powershell and working in powershell. You can call the variable $null but what's important is the format and information it contains. The info in your output json is the most important part and should look like my example.  ... View more

Re: which parameters in an API call are required

by MarkD_BT in Developers & APIs
‎09-25-2019 04:55 PM
‎09-25-2019 04:55 PM
@CBurkhead no problems we are all here to help. I've not done anything in python so can't say how painful that is. I just know being reliant on others doesn't always work in your own situations so best to break it down and build to suit your needs. ... View more

Re: which parameters in an API call are required

by MarkD_BT in Developers & APIs
‎09-25-2019 02:49 PM
‎09-25-2019 02:49 PM
Hey @CBurkhead Have you got it sorted and working now? I do alot of testing with a test network to make sure the api only touches what I want it to had a few that would have caused problems. Can say always test before rollout I remember alerts being a strange one where everything has to be assigned correctly couldn't leave out of the call or would implement strange behaviour.  ... View more

Re: which parameters in an API call are required

by MarkD_BT in Developers & APIs
‎09-25-2019 08:27 AM
‎09-25-2019 08:27 AM
"stickyMacWhitelistLimit": "2",   that shouldn't be defined as originally requested ... View more

Re: which parameters in an API call are required

by MarkD_BT in Developers & APIs
‎09-25-2019 08:12 AM
1 Kudo
‎09-25-2019 08:12 AM
1 Kudo
@sebas  are you able to provide how your json looks which is being sent in the script   $body = @{ "name" = $name "tags" = $tags "enabled" = $enabled "type" = $type "vlan" = $vlan "voiceVlan" = $voiceVlan "allowedVlans" = $allowedVlans "poeEnabled" = $poeEnabled "isolationEnabled" = $isolationEnabled "rstpEnabled" = $rstpEnabled "stpGuard" = $stpGuard #"accessPolicyNumber" = $accessPolicyNumber "linkNegotiation" = $linkNegotiation #"portScheduleId" = $portScheduleId "udld" = $udld #"macWhitelist" = $macWhitelist #"stickyMacWhitelist" = $stickyMacWhitelist "stickyMacWhitelistLimit" = $stickyMacWhitelistLimit } | ConvertTo-Json this is how mine looks when sent to api.meraki and works fine   { "name":"test voice Vlan Update", "tags":null, "enabled":true, "poeEnabled":true, "type":"access", "vlan":10, "voiceVlan":null, "allowedVlans": "all", "isolationEnabled": false, "rstpEnabled": true, "stpGuard": "BPDU guard", "accessPolicyNumber": null, "linkNegotiation": "Auto negotiate", "portScheduleId": null, "udld": "Alert only" } ... View more

Re: which parameters in an API call are required

by MarkD_BT in Developers & APIs
‎09-25-2019 05:52 AM
‎09-25-2019 05:52 AM
Hey I know it doesn't use the voice vlan info. What i'm saying is I can even remove the value in that scenario.   My 1st test was an access port with voice vlan removing. Here is my change log with the changes you requested. Show your script and we might be able to see what's going wrong.   1 creating access port with voice vlan via API PUT /api/v0/devices/****-****-****/switchPorts/5 old {"number":5,"name":"test voice Vlan Update","tags":null,"enabled":true,"poeEnabled":true,"type":"trunk","vlan":10,"voiceVlan":null,"allowedVlans":"all","isolationEnabled":false,"rstpEnabled":true,"stpGuard":"bpdu guard","accessPolicyNumber":null,"linkNegotiation":"Auto negotiate","portScheduleId":null,"udld":"Alert only","macWhitelist":null,"stickyMacWhitelist":null,"stickyMacWhitelistLimit":null} new {"number":5,"name":"test voice Vlan Update","tags":null,"enabled":true,"poeEnabled":true,"type":"access","vlan":20,"voiceVlan":25,"allowedVlans":"all","isolationEnabled":false,"rstpEnabled":true,"stpGuard":"bpdu guard","accessPolicyNumber":null,"linkNegotiation":"Auto negotiate","portScheduleId":null,"udld":"Alert only","macWhitelist":null,"stickyMacWhitelist":null,"stickyMacWhitelistLimit":null} 2 changing to trunk port via API PUT /api/v0/devices/****-****-****/switchPorts/5 old {"number":5,"name":"test voice Vlan Update","tags":null,"enabled":true,"poeEnabled":true,"type":"access","vlan":20,"voiceVlan":25,"allowedVlans":"all","isolationEnabled":false,"rstpEnabled":true,"stpGuard":"bpdu guard","accessPolicyNumber":null,"linkNegotiation":"Auto negotiate","portScheduleId":null,"udld":"Alert only","macWhitelist":null,"stickyMacWhitelist":null,"stickyMacWhitelistLimit":null} new {"number":5,"name":"test voice Vlan Update","tags":null,"enabled":true,"poeEnabled":true,"type":"trunk","vlan":10,"voiceVlan":25,"allowedVlans":"all","isolationEnabled":false,"rstpEnabled":true,"stpGuard":"bpdu guard","accessPolicyNumber":null,"linkNegotiation":"Auto negotiate","portScheduleId":null,"udld":"Alert only","macWhitelist":null,"stickyMacWhitelist":null,"stickyMacWhitelistLimit":null} 3 changing back to access port and removing voice vlan. via API PUT /api/v0/devices/****-****-****/switchPorts/5 old {"number":5,"name":"test voice Vlan Update","tags":null,"enabled":true,"poeEnabled":true,"type":"trunk","vlan":10,"voiceVlan":25,"allowedVlans":"all","isolationEnabled":false,"rstpEnabled":true,"stpGuard":"bpdu guard","accessPolicyNumber":null,"linkNegotiation":"Auto negotiate","portScheduleId":null,"udld":"Alert only","macWhitelist":null,"stickyMacWhitelist":null,"stickyMacWhitelistLimit":null} new {"number":5,"name":"test voice Vlan Update","tags":null,"enabled":true,"poeEnabled":true,"type":"access","vlan":10,"voiceVlan":null,"allowedVlans":"all","isolationEnabled":false,"rstpEnabled":true,"stpGuard":"bpdu guard","accessPolicyNumber":null,"linkNegotiation":"Auto negotiate","portScheduleId":null,"udld":"Alert only","macWhitelist":null,"stickyMacWhitelist":null,"stickyMacWhitelistLimit":null} ... View more

Re: which parameters in an API call are required

by MarkD_BT in Developers & APIs
‎09-25-2019 05:00 AM
‎09-25-2019 05:00 AM
Hi @CBurkhead    what does your changelog say against your change. Here is my call which is removing a the voice valn when it's populated then changed to a Trunk port.   Old Value {"number":5,"name":"test voice Vlan Update","tags":null,"enabled":true,"poeEnabled":true,"type":"trunk","vlan":1,"voiceVlan":20,"allowedVlans":"all","isolationEnabled":false,"rstpEnabled":true,"stpGuard":"bpdu guard","accessPolicyNumber":null,"linkNegotiation":"Auto negotiate","portScheduleId":null,"udld":"Alert only","macWhitelist":null,"stickyMacWhitelist":null,"stickyMacWhitelistLimit":null} New Value {"number":5,"name":"test voice Vlan Update","tags":null,"enabled":true,"poeEnabled":true,"type":"trunk","vlan":10,"voiceVlan":null,"allowedVlans":"all","isolationEnabled":false,"rstpEnabled":true,"stpGuard":"bpdu guard","accessPolicyNumber":null,"linkNegotiation":"Auto negotiate","portScheduleId":null,"udld":"Alert only","macWhitelist":null,"stickyMacWhitelist":null,"stickyMacWhitelistLimit":null} ... View more

Re: using github script, receiving 400 error, when I send the same command ...

by MarkD_BT in Developers & APIs
‎09-25-2019 04:00 AM
1 Kudo
‎09-25-2019 04:00 AM
1 Kudo
Hello @Meraki_Dave Meraki_Dave   what details for the port are you defining to update on the port. I'm noticing a problem with the following parameters you should be able to remove these if not required and the script should run. macWhitelist stickyMacWhitelist stickyMacWhitelistLimit ... View more

Re: which parameters in an API call are required

by MarkD_BT in Developers & APIs
‎09-25-2019 03:32 AM
‎09-25-2019 03:32 AM
Hey @sebas ,   I've been taking a quick look at this this morning can you do me a favour and try and #"stickyMacWhitelistLimit" to remove this parameter as well and try and run.   I have tested the following and it is working to remove the value in voice Vlan $jsonbodyUpPort = ' { "name":"test voice Vlan Update", "tags":null, "enabled":true, "poeEnabled":true, "type":"access", "vlan":10, "voiceVlan":null, "allowedVlans": "all", "isolationEnabled": false, "rstpEnabled": true, "stpGuard": "BPDU guard", "accessPolicyNumber": null, "linkNegotiation": "Auto negotiate", "portScheduleId": null, "udld": "Alert only" } '   ... View more

Re: API for controlling AP to reboot remotely

by MarkD_BT in Developers & APIs
‎09-25-2019 02:14 AM
3 Kudos
‎09-25-2019 02:14 AM
3 Kudos
Hi @Namgyu ,   If you look under the api list and under devices, there is the following which should allow you to reboot AP's Reboot a device HTTP Request POST /networks/{networkId}/devices/{serial}/reboot Parameters None Sample Request curl -L -H 'X -Cisco-Meraki-API-Key: <key>' -H 'Content - Type : application/json' -X POST 'https ://api.meraki.com/api/v0/networks/{networkId}/devices/{serial}/reboot' Sample Response Successful HTTP Status: 200 { "success" : true }     ... View more

Re: Powershell POST Script - Help

by MarkD_BT in Developers & APIs
‎09-24-2019 06:48 AM
‎09-24-2019 06:48 AM
Hey @LauraZ    glad it helped if your working against 1 organisation it's fine replacing the url, but If you have multiple orgs then this causes more issues. So I find it easier to use the base url and script a redirect so you can handle all orgs you might look after. Good luck with your scripting. ... View more

Re: Powershell POST Script - Help

by MarkD_BT in Developers & APIs
‎09-24-2019 01:55 AM
1 Kudo
‎09-24-2019 01:55 AM
1 Kudo
here is my method of dealing with redirects on PUT or POST calls. Incase of assistance.   $resource = "https://api.meraki.com/api/v0/networks/$networkId/devices/$serial" $redirect = Invoke-WebRequest -Uri $resource -MaximumRedirection 0 -Method PUT -Header $header -Body $body if ($redirect.StatusCode -eq 308) { $resourceRedirect = $redirect.Headers.Location Invoke-WebRequest -Uri $resourceRedirect -MaximumRedirection 0 -Method PUT -Header $header -Body $body } ... View more

Re: Search for MAC or IP addr in organization

by MarkD_BT in Developers & APIs
‎09-23-2019 08:00 AM
‎09-23-2019 08:00 AM
I can confirm this does work utilising the method from @jdsilva  I have created a script in powershell that does this but as stated it takes a long time to process.. Which is possibly the way my script is written but it works for searching for mac's at least. I search org > network > device then search for clients on the security appliance. We do have 350 sites to search through. You can take that as a basis on whether it is worth setting up. It has allowed us to find some user's who were serial bandwidth hogs and locate which sites they had been to.   ... View more

Re: API PUT blockedUrlCategories won't update. Comes back with not valid

by MarkD_BT in Developers & APIs
‎09-16-2019 08:00 AM
2 Kudos
‎09-16-2019 08:00 AM
2 Kudos
If you are using 1 category there should be no comma "," at the end of the line then denotes more to action.   "blockedUrlCategories": [ "meraki:contentFiltering/category/11" ] ... View more

Re: Update multiple devices in different networks

by MarkD_BT in Developers & APIs
‎09-13-2019 01:58 AM
1 Kudo
‎09-13-2019 01:58 AM
1 Kudo
Hey 5ghz,   how you getting on with this any joy was busy most of yesterday but might be able to cobble something together quickly if it helps. ... View more

Re: Update multiple devices in different networks

by MarkD_BT in Developers & APIs
‎09-11-2019 08:37 AM
1 Kudo
‎09-11-2019 08:37 AM
1 Kudo
Hey 5ghz,   Is it the same details against every network you use. I'm not a native programmer either but like tinkering happy to snap something together that will allow you to do your updates.   quick one just to show how to get all your networks against all your orgs These utilise GET commands so only reading data not writing.     #### make sure powershell runs script as tls1.2 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $apikey = "ENTER YOUR API KEY IN HERE" $header = @{ "X-Cisco-Meraki-API-Key" = $apikey "Content-Type" = 'application/json' }   ## Define the tables for storing devices used later ## $networklist_all = @()   $resourceOrgs = "https://api.meraki.com/api/v0/organizations" $resultOrgs = Invoke-RestMethod -Uri $resourceOrgs -Method GET -Header $header ForEach ($Org_Meraki in $resultOrgs) { $FindOrgid = $Org_Meraki.id $FindOrgName = $Org_Meraki.name $GetNetworks = "https://api.meraki.com/api/v0/organizations/$FindOrgid/networks/" Try { $resultGetNetworks = Invoke-RestMethod -Uri $GetNetworks -Method GET -Headers $header   }   catch [System.Net.WebException] { $Request = $_.Exception Write-Warning "No Networks In This Organisation '$FindOrgName'" Continue   } $resultGetNetworksSorted = $resultGetNetworks | Sort-Object name ForEach ($Network_Meraki in $resultGetNetworksSorted) { $Selected_network = New-Object psobject $Selected_network | Add-Member -MemberType NoteProperty -Name id -Value $Network_Meraki.id $Selected_network | Add-Member -MemberType NoteProperty -Name name -Value $Network_Meraki.name $Selected_network | Add-Member -MemberType NoteProperty -Name timeZone -Value $Network_Meraki.timeZone $Selected_network | Add-Member -MemberType NoteProperty -Name tags -Value $Network_Meraki.tags $Selected_network | Add-Member -MemberType NoteProperty -Name type -Value $Network_Meraki.type $Selected_network | Add-Member -MemberType NoteProperty -Name disableMyMerakiCom -Value $Network_Meraki.disableMyMerakiCom $Selected_network | Add-Member -MemberType NoteProperty -Name disableRemoteStatusPage -Value $Network_Meraki.disableRemoteStatusPage $Selected_network | Add-Member -MemberType NoteProperty -Name OrgName -Value $FindOrgName $networklist_all+=$Selected_network   } } $networklist_all   ... View more

Re: Update multiple devices in different networks

by MarkD_BT in Developers & APIs
‎09-11-2019 04:43 AM
1 Kudo
‎09-11-2019 04:43 AM
1 Kudo
Hi 5ghz,   I don't think postman allow for multiple queries at the same time so your going to have to look at some programing language to achieve this. I perform it using windows powershell as it was available on my works machine and not locked down from use or needing any other software installing. My loops are ForEach statements to look at each org/network/device in an array.   get orgs > foreach org > get network > foreach network > get devices (or what ever information you are after)   Are your snmp settings going to be the same against all your networks or is there individual credentials for them. Also is this going to be published to every network you can see or only certain ones. As you could tackle them slightly different depending on that. Depending if you have to filter on certain sites and or have different information to publish to that list.     ... View more

Re: API GET request include "Notes" property?

by MarkD_BT in Developers & APIs
‎07-04-2019 12:55 AM
‎07-04-2019 12:55 AM
Hey DaveRey, are these devices in one network or across multiple networks? If multiple networks you should build a array of all your devices in there. This can be exported to a csv or file for editing. I have a script that loops through each site in the org and pull back devices for each. I then use that to list of all devices in our org rather than the /organizations/{organizationId}/devices which has the startingAfter parameters. ... View more

Re: API PUT blockedUrlCategories won't update. Comes back with not valid

by MarkD_BT in Developers & APIs
‎05-07-2019 07:05 AM
2 Kudos
‎05-07-2019 07:05 AM
2 Kudos
Hello All,   Just been testing this and is working ok Json is in the following format no name details and a list of all the categories you require.   "blockedUrlCategories": [ "meraki:contentFiltering/category/11", "meraki:contentFiltering/category/18", "meraki:contentFiltering/category/25", "meraki:contentFiltering/category/27", "meraki:contentFiltering/category/33", "meraki:contentFiltering/category/34", "meraki:contentFiltering/category/46", "meraki:contentFiltering/category/48", "meraki:contentFiltering/category/49", "meraki:contentFiltering/category/53", "meraki:contentFiltering/category/54", "meraki:contentFiltering/category/56", "meraki:contentFiltering/category/57", "meraki:contentFiltering/category/59", "meraki:contentFiltering/category/62", "meraki:contentFiltering/category/64", "meraki:contentFiltering/category/67", "meraki:contentFiltering/category/70" ]   hope it helps ... View more

Re: API returning 404 on almost all requests

by MarkD_BT in Developers & APIs
‎04-29-2019 12:42 AM
1 Kudo
‎04-29-2019 12:42 AM
1 Kudo
Is this the 1st api call you have utilised?   it might be worth using postman for a simple GET response   https ://api.meraki.com/api/v0/organizations   Is the org you are trying to add the ssid to listed on this GET if yes move down to networks of the org https ://api.meraki.com/api/v0/organizations/{organizationId}/networks   I've always found working at the top level then working down to be the best way to find out where the problem is in scripts. ... View more
Kudos from
User Count
Erick31
Erick31
1
5ghz
5ghz
2
ThatoneITguy
ThatoneITguy
1
CBurkhead
CBurkhead
1
Namgyu
Namgyu
1
View All
My Accepted Solutions
Subject Views Posted

Re: using github script, receiving 400 error, when I send the same command ...

Developers & APIs
2388 ‎09-25-2019 04:00 AM

Re: API for controlling AP to reboot remotely

Developers & APIs
2281 ‎09-25-2019 02:14 AM
View All
My Top Kudoed Posts
Subject Kudos Views

Re: API for controlling AP to reboot remotely

Developers & APIs
3 2281

Re: API PUT blockedUrlCategories won't update. Comes back with not valid

Developers & APIs
2 3975

Re: API PUT blockedUrlCategories won't update. Comes back with not valid

Developers & APIs
2 4206

Re: Attempting to Change PSK of SSID with Meraki API via Powershell

Developers & APIs
2 6170

Re: API GET request include "Notes" property?

Developers & APIs
2 5195
View All
custom.footer.
  • Community Guidelines
  • Cisco Privacy
  • Khoros Privacy
  • Privacy Settings
  • Terms of Use
© 2022 Meraki