11-18-2019 03:42 PM
Hello,
This is my first time using the API to create networks. It seems the issue is when I try and add variables in Postman that I get the 404 errors. For example:
This generates a 404 error
{
"name": "{{name}}",
"timeZone": "America/Eastern",
"tags": " {{tag1}} {tag2}} ",
"disableMyMerakiCom": false,
"type": "appliance switch wireless"
}
This succeeds
{
"name": "Long Island Office",
"timeZone": "America/Los_Angeles",
"tags": " tag1 tag2 ",
"disableMyMerakiCom": false,
"type": "appliance switch camera"
}
I am sure I am missing something in postman to where the variables arent being called out properly. I am using command runner and attaching a csv called test to create a single network. Eventually I will be using this process to create hundreds.
Would anyone be able to point me in the correct direction as to why the 404 error is occuring?
Thanks,
Solved! Go to Solution.
11-19-2019 02:51 AM
I figured out the problem. When i went to duplicate the create network script under the collection it for some reason didnt duplicate one of the temporary headers containing the API key variable. Im not sure how to get that to transfer or to create that temporary value but for the time being I just modified the original with the variable values for name,tag1, and tag2 and it was successful.
11-18-2019 06:14 PM
404 usually means the URL you are calling is wrong or malformed.
11-19-2019 02:45 AM
So this is the URL its using which should not have been modified
https://api.meraki.com/api/v0/organizations/:organizationId/networks
11-19-2019 02:54 AM
don't forget you'll need to specify your orgid in that url, rather than the placeholder :organizationid 🙂
11-19-2019 02:57 AM
@nealgs1 wrote:don't forget you'll need to specify your orgid in that url, rather than the placeholder :organizationid 🙂
Not if you have it setup as a variable in your postman "environment" 😉.
11-19-2019 03:19 AM
that is true 👍
11-19-2019 02:57 AM
I have an environment (I think thats what its called) that has the orgid and api-key in it. From what I read it should be calling on those each time it does a GET/POST.
11-18-2019 11:21 PM
Could it be the missing opening curly bracket for tag 2?
11-19-2019 02:36 AM
Not sure if you've read this part of the Postman docs:
https://learning.getpostman.com/docs/postman/environments-and-globals/variables/
hope it helps
11-19-2019 02:51 AM
I figured out the problem. When i went to duplicate the create network script under the collection it for some reason didnt duplicate one of the temporary headers containing the API key variable. Im not sure how to get that to transfer or to create that temporary value but for the time being I just modified the original with the variable values for name,tag1, and tag2 and it was successful.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide