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 Badr-eddine
Badr-eddine

Badr-eddine

Getting noticed

Member since Feb 13, 2023

Wednesday
Groups
  • API Early Access Group

    API Early Access Group

    598
  • CLUS 2023 Meraki Lounge

    CLUS 2023 Meraki Lounge

    114
View All
Kudos from
User Count
RaphaelL
Kind of a big deal RaphaelL
4
GreenMan
Meraki Employee GreenMan
1
PhilipDAth
Kind of a big deal PhilipDAth
6
Deebow
Deebow
1
AmyReyes
Community Manager AmyReyes
2
View All
Kudos given to
User Count
Terry_Chan
Terry_Chan
1
Oren
Meraki Employee Oren
1
PhilipDAth
Kind of a big deal PhilipDAth
6
Minyi
Meraki Employee Minyi
1
Rusalka
Rusalka
1
View All

Community Record

25
Posts
27
Kudos
3
Solutions

Badges

ECMS1
ECMS2
CMNA
25 Posts
First 5 Posts
25 Kudos View All
Latest Contributions by Badr-eddine
  • Topics Badr-eddine has Participated In
  • Latest Contributions by Badr-eddine

Re: Meraki Appliance API - WAN1 (dynamic) - can show the assigned IP addres...

by Badr-eddine in Developers & APIs
a week ago
3 Kudos
a week ago
3 Kudos
Hello,   It appears that you're interested in retrieving the dynamic public IP address assigned by your ISP for WAN1 or WAN2 using the Cisco Meraki API. You mentioned using the `getDeviceApplianceUplinksSettings` API call, but please note that this call only retrieves the configuration and settings of the device uplink.   In your case, you should use the `getOrganizationUplinksStatuses` API call to obtain not only the configuration but also the status of the interface, which will display the IP address assigned to your uplinks.  Please feel free to visit https://developer.cisco.com/meraki/api/get-organization-uplinks-statuses/ for more docs.     Using the `getOrganizationUplinksStatuses` call, you can obtain the current IP address assigned to your uplinks along with additional relevant information.   Let's me knew if this solution adequately addresses your request?   ... View more

Re: Not getting expected results via Postman or Meraki Tools??

by Badr-eddine in Developers & APIs
‎08-15-2023 03:05 AM
‎08-15-2023 03:05 AM
Hi, try this JavaScript test script in Postman:   // Test if the response status code is 200 pm.test("Response status code is 200", function () { pm.response.to.have.status(200); }); // Test and filter the response based on product type and isBoundToConfigTemplate pm.test("Filters the JSON response data to find networks with the 'wireless' product type that are not bound to a configuration template", function () { // Parse the JSON response data var jsonData = pm.response.json(); // Filter the array of networks based on specified conditions var filteredNetworks = jsonData.filter(function (network) { return network.productTypes.includes('wireless') && network.isBoundToConfigTemplate === false; }); // Assert that the filteredNetworks array is not empty pm.expect(filteredNetworks).to.be.an('array').and.not.empty; // Store the filteredNetworks array in the environment as a JSON string pm.environment.set('filteredNetworks', JSON.stringify(filteredNetworks)); });   This Postman test script validates an API response: 1. It checks if the response status code is 200. 2. It filters the JSON response data to find networks with the 'wireless' product type that are not bound to a configuration template. 3. The filtered network array is asserted to be non-empty, and the result is stored in the environment as a JSON string for further use.   Make sure that you have created an environment in Postman.   Feel free to ask! ... View more

Re: mx_firewall_control.py invalid format txt or json

by Badr-eddine in Developers & APIs
‎07-24-2023 05:21 AM
2 Kudos
‎07-24-2023 05:21 AM
2 Kudos
The JSON objects you provided seem to be correctly formatted, and there are no obvious syntax errors or missing commas.   The issue might be related to how the input data is being passed to the script, or how the script reads the input file?   Ensure that the update_input.txt file is saved with the proper encoding, such as UTF-8. You can check and change the encoding in Visual Studio Code by clicking on the "File" menu, then "Save with Encoding," and select "UTF-8" if it's not already set.   Otherwise, I reviewed the function loadruleset (responsible for loading a ruleset from a file and returning it as a list of JSON objects (rules)) catches any exceptions that occur during JSON parsing using a general except block so try to add some print statements to debug the function and check the values of p_filepath, buffer, jdump and the detailed exception at different stages to see if they match your expectations.   Let me knew If the issues persist! ... View more

Re: How to do multiple network ID's at once (Configuring Layer 7 on multipl...

by Badr-eddine in Developers & APIs
‎07-15-2023 05:36 AM
1 Kudo
‎07-15-2023 05:36 AM
1 Kudo
I recommend utilizing a pre-existing tool that has already been developed for the purpose of provisioning Layer 7 firewall rules on multiple networks. You can find this tool at the following link: [https://developer.cisco.com/codeexchange/github/repo/gve-sw/GVE_DevNet_Meraki_MX_Firewall_Provisioner/](https://developer.cisco.com/codeexchange/github/repo/gve-sw/GVE_DevNet_Meraki_MX_Firewall_Provisioner/).   Let's me knew if this solution adequately addresses your request? ... View more

Re: APi that provides configured uplink bandwidth on wan1 or wan2 or ceullu...

by Badr-eddine in Developers & APIs
‎07-12-2023 07:36 AM
‎07-12-2023 07:36 AM
Absolutely, interface bandwidth cannot exceed the maximum throughput of the MX ... View more

Re: APi that provides configured uplink bandwidth on wan1 or wan2 or ceullu...

by Badr-eddine in Developers & APIs
‎07-12-2023 01:32 AM
‎07-12-2023 01:32 AM
Hello,   After conducting thorough research, I have discovered an additional API call that retrieves uplink configurations of an MX device. This particular call can be made using the endpoint.   /devices/{serial}/appliance/uplinks/settings   However, I noticed that the response from this call does not include the provisioned bandwidth settings. It appears that the provisioned bandwidth might be a fixed value depending on the interface type. For example, in the case of an MX67 device, all of its interfaces are RJ45 ports, allowing them to achieve a maximum bandwidth of 1G.   ... View more

Re: Adding Local subnets in Site to Site VPN with API

by Badr-eddine in Developers & APIs
‎07-11-2023 08:34 AM
‎07-11-2023 08:34 AM
Hello,   From the docs, it appears that the requested feature does not currently exist yet. The correct syntax for this feature is as follows: { "mode": "<string>", "hubs": [ { "hubId": "<string>", "useDefaultRoute": "<boolean>" }, { "hubId": "<string>", "useDefaultRoute": "<boolean>" } ], "subnets": [ { "localSubnet": "<string>", "useVpn": "<boolean>" }, { "localSubnet": "<string>", "useVpn": "<boolean>" } ] }    @John-K, I believe this request could potentially be a proposal for new endpoint? ... View more

Re: Points Contest: Week 3 Roundup

by Badr-eddine in Community Announcements
‎07-07-2023 02:35 PM
7 Kudos
‎07-07-2023 02:35 PM
7 Kudos
All the very best for your all 💯 ... View more

Re: API Rate Limit Questions

by Badr-eddine in Developers & APIs
‎07-06-2023 02:20 AM
2 Kudos
‎07-06-2023 02:20 AM
2 Kudos
Hello,   The statement "Each Meraki organization is allocated a call budget of 10 requests per second" implies that within the Meraki platform, every organization has a maximum allowance of 10 API requests per second, without considering the source IP or agent.   To further elaborate, if each Meraki organization is granted a call budget of 10 requests per second, we can divide the requests evenly within intervals of 100 milliseconds (0.1 seconds). By doing so, we can determine the number of requests that can be made within that specific timeframe.   I usually conduct a Postman runner test with numerous requests, where I followed the practice of separating each request by a 100-millisecond or greater interval, and it worked flawlessly.   Please it's me knew if this information answers your question? ... View more

Re: Is there an auto refresh for the dashboard?

by Badr-eddine in Dashboard & Administration
‎07-05-2023 01:03 AM
‎07-05-2023 01:03 AM
Hello,   Currently, the dashboard lacks an auto-refresh feature in multiple areas, resulting in pages that do not automatically update their information, necessitating manual refreshing. For instance, even a basic task like updating a device's name requires manually refreshing the page to observe the changes.   However, it is worth mentioning that in my limited experience with the MX appliances and MS, certain elements like the port status and the HA status are automatically refreshed ... View more

Staging Environment for CI/CD Integration

by Badr-eddine in Developers & APIs
‎07-04-2023 01:39 PM
‎07-04-2023 01:39 PM
Hello community!   In order to configure the Meraki dashboard using API calls, all pushed configurations are currently deployed directly to the production environment. However, I have an idea to improve this process by introducing a staging environment. Of note, staging can be a static environment for testing. It's also possible to provision a dynamic environment with dedicated configuration. This approach would allow us to push configurations and test them without affecting the production environment. Once we have validated these configurations, we can proceed to push them to production. This integration can be favorably incorporated into a CI/CD platform.   While the Python library provides a helpful "simulate" option, I intentionally tested it with an incorrect payload and the test was unexpectedly successful 🙂. Therefore, it may not be the most reliable solution. Another option is to create a separate organization, but that would require additional equipment. I'm unsure if there are any existing implementations of my idea, but I believe it would greatly enhance the configuration process.   Your suggestions are valuable, thank you! ... View more

Re: Creating a snapshot of Meraki network for backup & restore

by Badr-eddine in Developers & APIs
‎07-04-2023 04:21 AM
2 Kudos
‎07-04-2023 04:21 AM
2 Kudos
Hello,   I think this request doesn't exist in the Meraki API (https://developer.cisco.com/meraki/api-latest/). There's already a tool available for backing up and restoring networks, which can come to your rescue. You can find this tool on the DevNet Exchange Hub. Just follow this link: https://developer.cisco.com/codeexchange/github/repo/gve-sw/meraki-config-manager.   Please let me know if this suggestion resolves your issue!   ... View more

Re: How to configure multiple subnets at Meraki IPSec VPN subnets

by Badr-eddine in Security / SD-WAN
‎07-04-2023 01:46 AM
‎07-04-2023 01:46 AM
You're welcome, let me knew if this resolve your issue? ... View more

Re: How to configure multiple subnets at Meraki IPSec VPN subnets

by Badr-eddine in Security / SD-WAN
‎07-03-2023 03:07 AM
2 Kudos
‎07-03-2023 03:07 AM
2 Kudos
Hello,   To add multiple subnets behind a FortiGate device in a Meraki site-to-site IPsec VPN configuration, you need to make some changes in both the Meraki Dashboard and the FortiGate configuration. Here are the general steps you can follow:   - Log in to the Meraki Dashboard (dashboard.meraki.com) and navigate to the organization and network where the VPN is configured. - Go to the "Security & SD-WAN" section and select "Site-to-site VPN" from the left menu. - Locate the existing VPN connection with the FortiGate and click on its name to edit the settings. - In the "Remote Subnets" section, add the additional subnets that are behind the FortiGate. Enter the subnet IP and subnet mask for each subnet you want to include. These subnets should match the ones you added in the FortiGate configuration. - Save the changes.   Example below:     ... View more

Re: Points Contest: Week 2 Roundup

by Badr-eddine in Community Announcements
‎07-03-2023 01:50 AM
3 Kudos
‎07-03-2023 01:50 AM
3 Kudos
All the very best for you all ! ... View more

Re: Moving Network/Devices Between Org

by Badr-eddine in Developers & APIs
‎06-27-2023 01:44 AM
1 Kudo
‎06-27-2023 01:44 AM
1 Kudo
Hello,   I think, the most effective approach would involve using API calls to extract group policies and VLAN settings in JSON format and subsequently applying them to the destination network. Alternatively, otherwise, you can submit an issue on the Meraki automation scripts repository: https://github.com/meraki/automation-scripts.      ... View more

Re: Script to update site-site vpn hub for every site in one go

by Badr-eddine in Developers & APIs
‎06-26-2023 01:20 AM
‎06-26-2023 01:20 AM
Hello all,    I'm pleased to share an update regarding my script, which now includes support for handling more specific cases. You can access the latest version at the following GitHub repository: https://github.com/baadrdeen/Meraki_vpn_hub_updater.   Thank you for your attention and happy exploring! ... View more

Re: Script to update site-site vpn hub for every site in one go

by Badr-eddine in Developers & APIs
‎06-22-2023 02:38 AM
1 Kudo
‎06-22-2023 02:38 AM
1 Kudo
Hello, you can use the below script.         import os import meraki import concurrent.futures import time # Create a Meraki API session with API key retrieved from environment variable API_KEY = os.environ.get('MERAKI_API_KEY') # simulate : simulate=True or deploy: simulate=False dashboard = meraki.DashboardAPI(API_KEY, simulate=True) # Delay between API calls to comply with the rate limit (0.1 seconds (100 milliseconds)) API_CALL_DELAY = 0.1 def update_vpn_hub(network_id, hub_id): try: # Get the current VPN settings for the network vpn_settings = dashboard.appliance.getNetworkApplianceVpnSiteToSiteVpn(network_id) if hub_id: # Update the VPN hub ID vpn_settings['hubs'] = [{'hubId': hub_id, 'useDefaultRoute': True}] # Update the VPN settings response = dashboard.appliance.updateNetworkApplianceVpnSiteToSiteVpn( network_id, vpn_settings['mode'], hubs=vpn_settings['hubs'], subnets=vpn_settings['subnets'] ) print(f'Successfully updated VPN hub ID for network ID: {network_id}') print(response) except meraki.APIError as e: print(f'Error updating VPN hub ID for network ID: {network_id}. Error message: {e}') def update_all_vpn_hubs(org_id, hub_id): try: # Get a list of networks in the organization networks = dashboard.organizations.getOrganizationNetworks(org_id) with concurrent.futures.ThreadPoolExecutor() as executor: # Iterate over each network and submit update tasks futures = [] for network in networks: futures.append(executor.submit(update_vpn_hub, network['id'], hub_id)) time.sleep(API_CALL_DELAY) # Introduce a delay between API calls # Wait for all tasks to complete concurrent.futures.wait(futures) except meraki.APIError as e: print(f'Error fetching networks. Error message: {e}') def main(): # Specify the organization ID org_id = 'YOUR ORG ID' # Specify the VPN hub name hub_name = 'YOUR HUB NAME' try: # Get a list of networks in the organization networks = dashboard.organizations.getOrganizationNetworks(org_id) # Find the hub ID by name hub_id = next((network['id'] for network in networks if network['name'] == hub_name), None) if hub_id: update_all_vpn_hubs(org_id, hub_id) else: print(f'Error: VPN hub name "{hub_name}" not found.') except meraki.APIError as e: print(f'Error fetching networks. Error message: {e}') if __name__ == '__main__': # Execute the main function main()         First, add the API key as an environment variable.   Create the script file vpn_hub_updater.py in a text editor. Modify the following variables at the top of the script: org_id: Replace 'YOUR ORG ID' with your actual organization ID. hub_name: Replace 'YOUR HUB NAME' with the desired VPN hub name. By default, the script is set to simulate the operation (simulate=True). It will only plan the updates without actually making changes to the Meraki networks. If you want to deploy the changes in the production environment, set simulate=False in the dashboard initialization. Save the changes. Open a terminal or command prompt and navigate to the directory where the script is located. Run the script vpn_hub_updater.py. The script will retrieve the networks in your organization, find the hub ID based on the provided hub name, and update the VPN hub ID for each network. The progress and results will be displayed in the terminal. Note: The script automatically introduces a delay between API calls to comply with the Meraki API rate limit of 10 calls per second. Monitor the output in the terminal for any errors or successful updates.   Please keep me informed if you encountered any issue! ... View more

Re: Problem with changing MX uplink settings via the API

by Badr-eddine in Developers & APIs
‎06-20-2023 04:28 AM
3 Kudos
‎06-20-2023 04:28 AM
3 Kudos
Hi, as this is a PUT request, it will perform a complete replacement of all the settings specified in the call, effectively deleting and reconfiguring all existing WAN settings associated with it. In contrast, a POST request merely appends new entries without modifying or removing any existing ones.     ... View more

Re: Cloning switch ports with action batch api call

by Badr-eddine in Developers & APIs
‎06-08-2023 06:34 AM
‎06-08-2023 06:34 AM
Thank you for your prompt response, it's a good solution, but I'm using only Postman to push the configurations. Additionally, the batch action api call can also be used to test if the configuration will be pushed correctly if the attribute confirmed is set to false "confirmed": false,   ... View more

Cloning switch ports with action batch api call

by Badr-eddine in Developers & APIs
‎06-08-2023 04:13 AM
‎06-08-2023 04:13 AM
Hello All,   When attempting to utilize the organizations/{{orgId}}/switch/devices/clone api call with Meraki Action Batche, an error message is thrown, indicating that this combination is not supported:       { "errors": [ "organizations/XXXXXXXXX/switch/devices/clone does not support Action Batches." ] }       Here is the action batch body :     { "confirmed": false, "synchronous": true, "actions": [ { "resource": "organizations/{{organizationId}}/switch/devices/clone", "operation": "update", "body": { "sourceSerial": "XXXX-XXXX-XXXX", "targetSerials": [ "{{SN1}}" ] } } ] }     I'm wondering if there is any workaround? ... View more

Re: Rate limit of 10 is not enough when using multiple integrations

by Badr-eddine in Developers & APIs
‎06-01-2023 02:27 AM
‎06-01-2023 02:27 AM
I would like to inform you that this methodology has a limitation. For instance, if we encounter the issue of exceeding the API rate, this call will not function properly. Consequently, we will be unable to effectively monitor the ongoing activities. ... View more

Re: Rate limit of 10 is not enough when using multiple integrations

by Badr-eddine in Developers & APIs
‎05-31-2023 04:00 AM
‎05-31-2023 04:00 AM
I think the action batch feature in the Meraki API is a valuable option to consider when developing third-party integrations. It can be utilized to circumvent rate limitations and improve overall efficiency. By grouping multiple API requests into a single batch, developers can optimize their interactions with the Meraki API and reduce the chances of hitting rate limits. However, it would be beneficial if Meraki offered a dedicated solution to monitor API calls, including the ability to track the history of calls and errors. Such a monitoring feature would greatly assist developers in identifying and resolving errors during the development process. Having visibility into the API call history and error logs would enhance troubleshooting capabilities and contribute to smoother integration experiences. By implementing comprehensive monitoring and error tracking, Meraki can empower operators to identify issues more efficiently, ultimately improving the integration process and facilitating faster resolution of any problems that may arise. ... View more

Re: Meraki MX Tunnel Stats when not Auto VPN

by Badr-eddine in Developers & APIs
‎05-22-2023 08:00 AM
‎05-22-2023 08:00 AM
I think the reason for this limitation is that Meraki MX devices primarily provide traffic and data usage statistics, focusing on monitoring and managing network traffic rather than providing detailed network performance metrics like latency, packet loss, jitter, and MOS scores. ... View more

Update VPN Third Party VPN Peers

by Badr-eddine in Security / SD-WAN
‎05-22-2023 03:11 AM
‎05-22-2023 03:11 AM
We are currently working on a script that automates the deployment of our third-party VPN. Our objective is to avoid any disruption to the existing tunnels while adding new ones. The API Call that facilitates this operation is:    PUT /organizations/{organizationId}/appliance/vpn/thirdPartyVPNPeers   However, it's important to note that since this is a PUT call, it will overwrite all the configurations specified in that particular request, resulting in the deletion and subsequent re-establishment of all the existing tunnels. Considering the significance of maintaining continuity and uninterrupted business operations, we are exploring potential workarounds to address this issue. We aim to find a solution that allows for the seamless addition of new tunnels while preserving the functionality of the existing ones.   Thank you!     ... View more
Labels:
  • Labels:
  • 3rd Party VPN
  • Firewall
Kudos from
User Count
RaphaelL
Kind of a big deal RaphaelL
4
GreenMan
Meraki Employee GreenMan
1
PhilipDAth
Kind of a big deal PhilipDAth
6
Deebow
Deebow
1
AmyReyes
Community Manager AmyReyes
2
View All
Kudos given to
User Count
Terry_Chan
Terry_Chan
1
Oren
Meraki Employee Oren
1
PhilipDAth
Kind of a big deal PhilipDAth
6
Minyi
Meraki Employee Minyi
1
Rusalka
Rusalka
1
View All
My Accepted Solutions
Subject Views Posted

Re: Meraki Appliance API - WAN1 (dynamic) - can show the assigned IP addres...

Developers & APIs
104 a week ago

Re: How to do multiple network ID's at once (Configuring Layer 7 on multipl...

Developers & APIs
632 ‎07-15-2023 05:36 AM

Re: Script to update site-site vpn hub for every site in one go

Developers & APIs
277 ‎06-22-2023 02:38 AM
View All
My Top Kudoed Posts
Subject Kudos Views

Re: Points Contest: Week 3 Roundup

Community Announcements
7 1314

Re: Meraki Appliance API - WAN1 (dynamic) - can show the assigned IP addres...

Developers & APIs
3 104

Re: Points Contest: Week 2 Roundup

Community Announcements
3 1060

Re: Problem with changing MX uplink settings via the API

Developers & APIs
3 267

Re: mx_firewall_control.py invalid format txt or json

Developers & APIs
2 264
View All
Powered by Khoros
custom.footer.
  • Community Guidelines
  • Cisco Privacy
  • Khoros Privacy
  • Cookies
  • Terms of Use
© 2023 Meraki