Prob a syntax error ... would be pretty hard to debug without running the actual code. I can't seem to spot what's wrong with what you've shared though
Not sure but are you using API v0 ? Can you check with v1
I just ran across the V1.7 beta which network objects are in beta, and it had the base URL as
which still returned the same results. I can do a get request on all 3 of the Base URLs and gets the info from the Objects I created manually, but I need to create upwards of 2000+ and cannot see me getting available time to create each one individually on the GUI
When I have these kinds of issues I do a "get" request first, see the kind of data that has been returned, match it, and then use that when sending updates.
I don't see an error on your test, but you should consider changing the api point.
I've just received an e-mail that they will change the api and this one will be removed in the future
See Documentation for the new api
I am getting a 400 Bad Request. I did receive the email on the update from network objects to policy objects and am getting the same result. The get request information is different from what you need to send because it contains created times, object IDs, etc. What I am sending is the recommended by the meraki configuration guide that was released.
I just got some e-mails today detailing that the old calls should still work but they created a new location for the now called "policy objects'.
It seems they are in fact going to implement service objects in addition to network objects which is just awesome.
Maybe try to get the new API calls and check if anything changed.
Yup I tried all of that with the new syntax and I am still getting the same error. I tried to do a policy group and it gave me a similar error, but the get request worked on that. So obviously there is something that I am missing that needs to be added to a post request for these policy objects.
Alright so I have a small update. I can add objects individually but not multiple in the json format
If I send this it works
It's strange, I can find the policy objects in dashboard under help API docs, but the interactive API docs doesn't have these endpoints yet. These are handy because they contain examples and an import for Postman.
By the looks of the POST and PUT calls you can only add or modify one policy object at a time.
And for action batches, normally if the documentation would have been complete then you would have known if these calls can be put in an action batch.
For now, you'll need to script a series of these calls and just catch the error if you made too many calls and make it wait the time.