Comments (9)
I just tested and it was successful for me. It would be helpful to troubleshoot your situation if you included information like the version of the library you're using, your source code, and also the logging data as evidence of whether you are getting 2XX responses. Here's what works for me on the latest beta version 1.0.0b8:
import meraki
m = meraki.DashboardAPI()
m.devices.updateDevice(serial, address='500 Terry A Francois Blvd, San Francisco, CA 94158', moveMapMarker=True)
from dashboard-api-python.
Here's the code with the same result (200 OK, address updated and map marker moved successfully) on version 0.110.3.
import meraki
m = meraki.DashboardAPI()
m.devices.updateNetworkDevice(network_id, serial, address='500 Terry A Francois Blvd, San Francisco, CA 94158', moveMapMarker=True)
from dashboard-api-python.
Tried the following on version 0.90.2:
import meraki
apiKey = 'APIKEY'
dashboard = meraki.DashboardAPI(api_key=apiKey)
kwargs = {
'address': '6100 Tower Circle, Franklin, TN 37067',
'moveMapMarker ': True
}
dashboard.devices.updateNetworkDevice(networkID, serial, **kwargs)
I get a 200 response and the address is changed but the marker is not moved in the dashboard.
When I do it your way and remove the **kwargs and put the parms inline with the function call, it works. Any advice as to why it will take the address in the kwargs but not the moveMapMarker?
from dashboard-api-python.
Thanks for providing that information since it's exactly what is needed to troubleshoot. The reason why it doesn't work is because of the extra trailing space in the 'moveMapMarker '
key. Remove that, and you will be able to make the change successfully.
from dashboard-api-python.
Thank you for the information. I did not notice the extra space.
from dashboard-api-python.
No problem and due to this issue you've reported, we'll make a change to future versions so that errant spaces like this will be fixed automatically, basically changing payload = {k: v for (k, v) in kwargs.items() if k in body_params}
to payload = {k.strip(): v for (k, v) in kwargs.items() if k.strip() in body_params}
.
from dashboard-api-python.
I am curious why you allow values that are not valid and not have it error out? I just ran into a similar issue where I misspelled timeZone. It didn't throw an error and it took me a minute to find the mistake.
from dashboard-api-python.
You can only do so much user error checking... if you try to make the API call separately of the Python library, you'll see you can include random attributes/objects to the request body, and it wouldn't return an error either.
from dashboard-api-python.
Hey @neveragain2003, thinking about this more, if we were to check for invalid input parameters like moveMapMarker
(with a space) or timezone
(without capitalizing Z), what would you like to see happen? For example, a warning message that gets displayed to notify you about the typo (but still proceeding to make the call), or an exception where that call is not made entirely at all?
from dashboard-api-python.
Related Issues (20)
- function not passing 'type' variable HOT 1
- Early Access Supported Calls HOT 1
- Incorrect kwarg is not logged or rejected HOT 4
- Identity PSKs always return null for expiresAt field HOT 1
- 204-No Content error HOT 1
- Logging level HOT 2
- This library requires Python 3.7 at minimum and your interpreter version is 3.10.0 HOT 1
- aiomeraki.organizations.getOrganizationApiRequests failing after upgrading the SDK from 1.34.0 to 1.36.0 HOT 5
- aio/rest_session.py crashing on 400 errors with a UnboundLocalError HOT 6
- 'Wireless' object has no attribute 'getOrganizationWirelessDevicesEthernetStatuses' HOT 1
- Async operations gets a certificate error (while sync operation works fine) HOT 10
- Library crashes with AttributeError when API returns 404 with no body HOT 1
- meraki 1.39 shows support for python 3.7 HOT 1
- installation fails on Windows HOT 1
- batch.networks.removeNetworkDevices has the incorrect operation HOT 2
- passing pagination (total_pages) params to getOrganizationApplianceTrafficShapingVpnExclusionsByNetwork results in error HOT 4
- Minor Documentation Spelling Error HOT 2
- API Endpoint /organizations/{organizationId}/wireless/radio/autoRf/byNetwork Missing HOT 1
- Generator does not add the required query parameters to methods if the query parameters are arrays of objects HOT 1
- claimNetworkDevices with addAtomically fails with unexpected keyword argument HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dashboard-api-python.