404 Error when Creating Networks

SOLVED
ksmith1413
Here to help

404 Error when Creating Networks

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,

1 ACCEPTED SOLUTION
ksmith1413
Here to help

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.

View solution in original post

9 REPLIES 9
PhilipDAth
Kind of a big deal
Kind of a big deal

404 usually means the URL you are calling is wrong or malformed.

So this is the URL its using which should not have been modified

 

https://api.meraki.com/api/v0/organizations/:organizationId/networks

nealgs
Building a reputation

don't forget you'll need to specify your orgid in that url, rather than the placeholder :organizationid  🙂

BrechtSchamp
Kind of a big deal


@nealgs 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" 😉.

nealgs
Building a reputation

that is true 👍

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.

BrechtSchamp
Kind of a big deal

Could it be the missing opening curly bracket for tag 2?

nealgs
Building a reputation

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

ksmith1413
Here to help

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.

Get notified when there are additional replies to this discussion.