Wireless: use createNetworkFloorplan API to upload maps of floors have Postman, any help appreciated

Solved
Jamieinbox
Building a reputation

Wireless: use createNetworkFloorplan API to upload maps of floors have Postman, any help appreciated

Totally new to trying to get this to work. I understand that if I want to make this recursive, I will need to work some Python magic. I am very interested in doing this as I have over 500 floors to upload (campus setting).

 

Goal- Upload floor plans to Meraki in bulk. Don't want to upload them one at a time. They are on my hard drive, how do I load them up to Meraki Cloud with API to automate the process? I have familiarized myself with Postman and have done simple tasks.

Mini Goal- upload one floor plan with API.


Trying to work with the API:


POST {{baseUrl}}/networks/:networkId/floorPlans

 

Here's my interpretation of what I need to do:

baseUrl = where am I going to post my floor plan to. My meraki customer location.

networks = part of the path in the cloud
network ID = one my campus IDs (we have 3)

floorPlans = location of where they are being posted

floorPlanId= looks like I need to create this? Hoping this would be assigned with API. I'm assuming I need to do something like the name of the floor plan "Education Building Smith Floor 1" with a next upload of "Education Building Smith Floor 2."

 

Questions based on my assumptions above:

1- If that's a post to Meraki, how do I call the material I want posted. Maybe a header or something? But I don't see that in the path provided. Is that something I add?

2- If I post this on a website with permissions- I don't see how to account for that right now either. Since Postman is local to my machine, I could pull from my computer to post but-
    a- Best to run a web server on my machine to work this out with Postman?
    b- What is the best practice here?

    c- Post them on a trusted Google drive to use that path to upload?

 

Thanks in advance for any help. I'm hoping to get schooled here and be smarter for it. 

 

 


Best, Jamie

1 Accepted Solution
colinster
Getting noticed

You might want to ask this in the API & Developers community forum - same website.

You probably already found this website: developers.meraki.com
You might not have found the Postman short url: postman.meraki.com/#2353e907-f391-45dd-941f-5f4f1a7f454b
Or this short URL to the live documentation: https://dashboard.meraki.com/api_docs/v0#upload-a-floor-plan

The URL you want is https://api.meraki.com/api/v0/networks/:networkId/floorPlans

baseUrl = this is just "api.meraki.com", but you can also use "dashboard.meraki.com" or your dashboard URL such as "n124.meraki.com"

networks = this stays just "networks"

network ID = you can find your network ID's by calling the list of networks via API https://dashboard.meraki.com/api_docs/v0#list-the-networks-in-an-organization
Basically paste this into a browser:
https://api.meraki.com/api/v0/organizations/[[organizationID]]/networks

You will need to know the organization ID number and you can find that here:
https://dashboard.meraki.com/api_docs/v0#list-the-organizations-that-the-user-has-privileges-on
network ID = one my campus IDs (we have 3)
Basically paste this in a browser:
https://api.meraki.com/api/v0/organizations/

floorPlans = this stays "floorPlans"

floorPlanId= Yes! you will create this ID, but you do not choose it, the way to create your floor plans is with this API call:
https://dashboard.meraki.com/api_docs/v0#upload-a-floor-plan

1. I would start by uploading via the dashboard and using the API just to GET and read the format.
2. Permissions are done with the API key. You'll need to read about that here:
https://documentation.meraki.com/zGeneral_Administration/Other_Topics/The_Cisco_Meraki_Dashboard_API

Here are all the parameters you will need to upload / create a floorplan:
Parameter Type Description
name string The name of your floor plan.
center object The longitude and latitude of the center of your floor plan. The 'center' or two adjacent corners (e.g. 'topLeftCorner' and 'bottomLeftCorner') must be specified. If 'center' is specified, the floor plan is placed over that point with no rotation. If two adjacent corners are specified, the floor plan is rotated to line up with the two specified points. The aspect ratio of the floor plan's image is preserved regardless of which corners/center are specified. (This means if that more than two corners are specified, only two corners may be used to preserve the floor plan's aspect ratio.). No two points can have the same latitude, longitude pair.
bottomLeftCorner object The longitude and latitude of the bottom left corner of your floor plan.
bottomRightCorner object The longitude and latitude of the bottom right corner of your floor plan.
topLeftCorner object The longitude and latitude of the top left corner of your floor plan.
topRightCorner object The longitude and latitude of the top right corner of your floor plan.
imageContents string The file contents (a base 64 encoded string) of your image. Supported formats are PNG, GIF, and JPG. Note that all images are saved as PNG files, regardless of the format they are uploaded in.

Colin Lowenberg
wireless engineer and startup founder, formerly known as "the API guy", now I run a Furapi, the therapy dog service, and Lowenberg Labs, an IT consulting company.

View solution in original post

5 Replies 5
Pulkit_Mittal
Getting noticed

Hi @Jamieinbox,

I believe you are looking for bulk upload, that can also be done from the dashboard.

Please have a look at: https://documentation.meraki.com/zGeneral_Administration/Using_the_Dashboard_File_Upload_Tools

I would also recommend reaching out to the Meraki Support.

Thanks!
Jamieinbox
Building a reputation

Thank you!
colinster
Getting noticed

You might want to ask this in the API & Developers community forum - same website.

You probably already found this website: developers.meraki.com
You might not have found the Postman short url: postman.meraki.com/#2353e907-f391-45dd-941f-5f4f1a7f454b
Or this short URL to the live documentation: https://dashboard.meraki.com/api_docs/v0#upload-a-floor-plan

The URL you want is https://api.meraki.com/api/v0/networks/:networkId/floorPlans

baseUrl = this is just "api.meraki.com", but you can also use "dashboard.meraki.com" or your dashboard URL such as "n124.meraki.com"

networks = this stays just "networks"

network ID = you can find your network ID's by calling the list of networks via API https://dashboard.meraki.com/api_docs/v0#list-the-networks-in-an-organization
Basically paste this into a browser:
https://api.meraki.com/api/v0/organizations/[[organizationID]]/networks

You will need to know the organization ID number and you can find that here:
https://dashboard.meraki.com/api_docs/v0#list-the-organizations-that-the-user-has-privileges-on
network ID = one my campus IDs (we have 3)
Basically paste this in a browser:
https://api.meraki.com/api/v0/organizations/

floorPlans = this stays "floorPlans"

floorPlanId= Yes! you will create this ID, but you do not choose it, the way to create your floor plans is with this API call:
https://dashboard.meraki.com/api_docs/v0#upload-a-floor-plan

1. I would start by uploading via the dashboard and using the API just to GET and read the format.
2. Permissions are done with the API key. You'll need to read about that here:
https://documentation.meraki.com/zGeneral_Administration/Other_Topics/The_Cisco_Meraki_Dashboard_API

Here are all the parameters you will need to upload / create a floorplan:
Parameter Type Description
name string The name of your floor plan.
center object The longitude and latitude of the center of your floor plan. The 'center' or two adjacent corners (e.g. 'topLeftCorner' and 'bottomLeftCorner') must be specified. If 'center' is specified, the floor plan is placed over that point with no rotation. If two adjacent corners are specified, the floor plan is rotated to line up with the two specified points. The aspect ratio of the floor plan's image is preserved regardless of which corners/center are specified. (This means if that more than two corners are specified, only two corners may be used to preserve the floor plan's aspect ratio.). No two points can have the same latitude, longitude pair.
bottomLeftCorner object The longitude and latitude of the bottom left corner of your floor plan.
bottomRightCorner object The longitude and latitude of the bottom right corner of your floor plan.
topLeftCorner object The longitude and latitude of the top left corner of your floor plan.
topRightCorner object The longitude and latitude of the top right corner of your floor plan.
imageContents string The file contents (a base 64 encoded string) of your image. Supported formats are PNG, GIF, and JPG. Note that all images are saved as PNG files, regardless of the format they are uploaded in.

Colin Lowenberg
wireless engineer and startup founder, formerly known as "the API guy", now I run a Furapi, the therapy dog service, and Lowenberg Labs, an IT consulting company.
Jamieinbox
Building a reputation

Thank you conlinster for the explanation! This is helpful.

GeorgeFrendl
Getting noticed

This is helpful! Thanks!

Get notified when there are additional replies to this discussion.