cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API V1 for Switch Routing and DHCP not working

Highlighted
Comes here often

API V1 for Switch Routing and DHCP not working

Hi , 

 

I am trying to use V1 beta API for updating  DHCP configuration on L3 interface of a meraki switch. When iam trying to update iam getting 500 internal server error . 

 

 
when i pull the configuration - i got this 
{'dhcpMode': 'dhcpRelay', 'dhcpRelayServerIps': ['10.1.0.1']}
 
but i do put with the body as below iam getting error 
 
{'dhcpMode': 'dhcpRelay', 'dhcpRelayServerIps': ['10.1.0.1','10.1.0.2]}
 
 

 

6 REPLIES 6
Kind of a big deal

Re: API V1 for Switch Routing and DHCP not working

I see a missing quote there - after 10.1.0.2.

 

{'dhcpMode': 'dhcpRelay', 'dhcpRelayServerIps': ['10.1.0.1','10.1.0.2']}

Highlighted
Comes here often

Re: API V1 for Switch Routing and DHCP not working

Sorry that was a typo . Even when i add that iam getting 500 error and now its showing 404 might be the service is down.

Highlighted
A model citizen

Re: API V1 for Switch Routing and DHCP not working

Instead of using the megaproxy, just use api.meraki.com.
I know it's there, but I have not seen anyone officially using it.
Highlighted
Comes here often

Re: API V1 for Switch Routing and DHCP not working

If i use api.meraki.com/api/v1  - even getting the device information is also throwing me 404 error . So i was trying with api-mp.meraki.com  with which iam atleast able to pull the information . 

 

But the issue is which i need to edit DHCP relay servers - iam getting 500 internal server error . 

 

I got a requirement to update more than 500 vlans on L3 switches to update DHCP relay information . So iam just testing that using virtual devices to see if there is any api i can leverage to get that task done rather than manually going into each vlan and update DHCP relay's.

 

Here is the output 

 

PUT
 
/devices/VRT-2207620184848/switch/routing/interfaces/641762946900298558/dhcp
 
Interface Id*
641762946900298558
Serial*
VRT-2207620184848
Request Body (Form)Request Body (JSON)
{
    "dhcpMode": "dhcpRelay",
    "dhcpRelayServerIps": [
        "10.1.0.1",
        "2.2.2.2"
    ]
}
Query Params
Headers
Response: 500  Internal Server Error
DataInfo
Copy
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Page not found - Cisco Meraki</title>
  <style type="text/css">
    body {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
      margin: 0 2em;
      font-family: Helvetica, Arial, sans-serif;
      line-height: 1.45;
      color: #222325; /* same as $gray-10 in mkiColorVariables.json */
    }
    .header__container,
    .content__container,
    .footer__container {
      max-width: 800px;
      width: 100%;
    }
    .header__container {
      padding: 2em 0;
      border-bottom: 1px solid #D7D7D9; /* same as $gray-80 in mkiColorVariables.json */
    }
    .header__merakiLogo {
      height: 2.125em;
    }
    .header__merakiLogo--gray {
      fill: #898b8e;
    }
    .header__merakiLogo--green {
      fill: #67b346;
    }
    h1.content__title {
      font-size: 1.728em; /* from typographyBase.scss */
      font-weight: 300;
      margin-bottom: 1em;
    }
    .content__container {
      margin-bottom: 1em;
    }
    .content__container a {
      color: #1D770B; /* same as $linkColor in variables.scss */
    }
    .footer__container {
      padding: 1em 0;
      text-align: right;
      border-top: 1px solid #D7D7D9; /* same as $gray-80 in mkiColorVariables.json */
    }
    .footer__text {
      font-size: 0.833em;
      color: #898A8C; /* same as $gray-50 in mkiColorVariables.json */
    }
  </style>
</head>
<body>
  <div class="header__container">
    <svg class="header__merakiLogo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130 25"><title>Cisco Meraki</title><rect class="header__merakiLogo--gray" x="13.29" y="16.46" width="2.06" height="8.17"/><path class="header__merakiLogo--gray" d="M32,18.8a3.64,3.64,0,0,0-1.73-.44,2.18,2.18,0,1,0,0,4.36A3.63,3.63,0,0,0,32,22.29v2.19a6.53,6.53,0,0,1-1.88.29,4.23,4.23,0,1,1,0-8.46,6.29,6.29,0,0,1,1.88.29Z"/><path class="header__merakiLogo--gray" d="M10.46,18.8a3.59,3.59,0,0,0-1.73-.44,2.18,2.18,0,1,0,0,4.36,3.59,3.59,0,0,0,1.73-.43v2.19a6.49,6.49,0,0,1-1.88.29,4.23,4.23,0,1,1,0-8.46,6.23,6.23,0,0,1,1.88.29Z"/><path class="header__merakiLogo--gray" d="M38.45,18.4a2.15,2.15,0,1,0,2.13,2.15,2.11,2.11,0,0,0-2.13-2.15m4.31,2.15a4.31,4.31,0,1,1-4.31-4.23,4.2,4.2,0,0,1,4.31,4.23"/><path class="header__merakiLogo--gray" d="M23.17,18.32a7.05,7.05,0,0,0-1.61-.25c-.83,0-1.27.27-1.27.67s.6.67.94.78l.57.18A2.46,2.46,0,0,1,23.74,22c0,2.05-1.81,2.74-3.38,2.74a12.56,12.56,0,0,1-2.22-.22V22.67a7.73,7.73,0,0,0,1.95.31c1,0,1.5-.3,1.5-.77s-.41-.65-.92-.81l-.44-.14c-1.15-.36-2.1-1-2.1-2.39,0-1.53,1.14-2.55,3-2.55a8.91,8.91,0,0,1,2,.26Z"/><path class="header__merakiLogo--gray" d="M2,7.68a1,1,0,0,0-2,0V9.83a1,1,0,1,0,2,0Z"/><path class="header__merakiLogo--gray" d="M7.66,4.87a1,1,0,0,0-2,0v5a1,1,0,0,0,2,0Z"/><path class="header__merakiLogo--gray" d="M13.28,1a1,1,0,0,0-2,0V11.87a1,1,0,1,0,2,0Z"/><path class="header__merakiLogo--gray" d="M18.9,4.87a1,1,0,0,0-2,0v5a1,1,0,1,0,2,0Z"/><path class="header__merakiLogo--gray" d="M24.52,7.68a1,1,0,0,0-2,0V9.83a1,1,0,1,0,2,0Z"/><path class="header__merakiLogo--gray" d="M30.14,4.87a1,1,0,0,0-2,0v5a1,1,0,1,0,2,0Z"/><path class="header__merakiLogo--gray" d="M35.77,1a1,1,0,1,0-2,0V11.87a1,1,0,1,0,2,0Z"/><path class="header__merakiLogo--gray" d="M41.39,4.87a1,1,0,0,0-2.06,0v5a1,1,0,0,0,2.06,0Z"/><path class="header__merakiLogo--gray" d="M47,7.68a1,1,0,0,0-2,0V9.83a1,1,0,1,0,2,0Z"/><path class="header__merakiLogo--green" d="M68.43,24.64,62.06,8.9V24.64H60.73V7.13h2l6.44,16,6.08-16h1.95V24.64H75.9V9l-6,15.61Z"/><path class="header__merakiLogo--green" d="M91.28,21.18A5.11,5.11,0,0,1,86,25c-3.43,0-6-2.36-6-6.69s2.5-6.69,5.76-6.69,5.71,2.19,5.71,7H81.36c.12,3.6,2.16,5.25,4.69,5.25a3.77,3.77,0,0,0,3.84-2.7Zm-9.9-3.65h8.75c-.17-3.24-2-4.84-4.35-4.84S81.63,14.37,81.38,17.54Z"/><path class="header__merakiLogo--green" d="M94.57,24.64V12h1.07l.19,2.43a3.67,3.67,0,0,1,3.55-2.8,4.51,4.51,0,0,1,1.31.2v1.29a4.93,4.93,0,0,0-1.39-.22c-1.85,0-3.43,1.8-3.43,4.84v6.91Z"/><path class="header__merakiLogo--green" d="M102.35,15.28c.19-2.16,2.12-3.65,4.91-3.65S112,13.21,112,15.79v8.85h-1.07l-.19-2.09A5,5,0,0,1,106.22,25c-2.46,0-4.23-1.33-4.23-3.57s1.31-3.48,4.86-4.06l3.79-.63v-1.1c0-1.82-1.29-2.94-3.45-2.94s-3.31,1-3.48,2.58Zm8.29,4.86V17.78l-3.4.58c-3,.51-3.89,1.46-3.89,3,0,1.7,1.31,2.55,3.21,2.55A4,4,0,0,0,110.64,20.14Z"/><path class="header__merakiLogo--green" d="M115.32,24.64V7.13h1.31v10L122.69,12h1.78L118,17.51l7.3,7.12h-1.77L116.63,18v6.69Z"/><path class="header__merakiLogo--green" d="M126.92,8.93V7.13h1.58v1.8ZM127,24.64V12h1.31V24.64Z"/></svg>
  </div>
  <div class="content__container">
    <h1 class="content__title">Page not found</h1>
    <p class="content__primaryText">The page you are looking for may have been moved or does not exist.</p>
    <p class="content__secondaryText">To log in to the Cisco Meraki Dashboard, go to <a href="https://dashboard.meraki.com">https://dashboard.meraki.com</a>.</p>
  </div>
  <div class="footer__container">
    <span id="footer" class="footer__text">&copy; Cisco Systems, Inc.</span>
  </div>
  <script type="text/javascript" charset="utf-8">
  //<![CDATA[
  (function () {
    var year = new Date().getFullYear();
    document.getElementById("footer").innerHTML = '&copy; ' + year + ' Cisco Systems, Inc.';
  })()
  //]]>
  </script>
</body>
</html>

 

Highlighted
A model citizen

Re: API V1 for Switch Routing and DHCP not working


VRT-2207620184848

This is not a Meraki Serial number.

Highlighted
Comes here often

Re: API V1 for Switch Routing and DHCP not working

I was trying with my demo account by spinning up some virtual switches . The serial number was from one of that virutal switch . 

 

I did the same test with my physical prod device and it worked . 

 

Thanks all for the assistance.

Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.