cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2341
Views
0
Helpful
14
Replies
thushara81
Beginner

How to get Zone info from CMX

I am trying to get zone details via CMX Maps API.

Although I can receive maps details, zone array of the floor is always empty("zones": []). By the Way I can see zone details at the notification event details.

And I don't know if there are any other methods to get zone details.

Can you please guide me about this issue please? How can I get zone details at maps api and/or is there any other method to get zone details?

I use both Prime and MSE Virtually and they are both trial licensed.(Base license)

Regards,

1 ACCEPTED SOLUTION

Accepted Solutions
matfarre
Frequent Contributor

Here's another API resource to try.

Get list of all of the zones and a reference ID for the Zone

http://<mse_ip>/api/config/v1/heterarchy/allUserLevels?filterElements=false

Matt

View solution in original post

14 REPLIES 14
matfarre
Frequent Contributor

Hi,

I see the zone details using Get All Maps /api/config/v1/maps resource.  Seems like there should be a attribute or parameter to filter for just a particular building or floor.  I'll check the earlier documentation to see if there may be a parameter to narrow the results.

Matt

"zones": [
                               
{
                                   
"name": "Conf Room",
                                   
"zoneCoordinate": [
                                       
{
                                           
"x": 65.226204,
                                           
"y": 10.505141,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 65.52748,
                                           
"y": 31.281244,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 136.32729,
                                           
"y": 32.184555,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 136.026,
                                           
"y": 10.806245,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
}
                                   
],
                                   
"zoneType": "ZONE"
                               
},
                               
{
                                   
"name": "Waiting area",
                                   
"zoneCoordinate": [
                                       
{
                                           
"x": 180.01227,
                                           
"y": 6.8919063,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 180.76546,
                                           
"y": 37.20292,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 265.27332,
                                           
"y": 37.90551,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 264.67075,
                                           
"y": 7.494112,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
}
                                   
],
                                   
"zoneType": "ZONE"
                               
},
                               
{
                                   
"name": "Lounge",
                                   
"zoneCoordinate": [
                                       
{
                                           
"x": 17.77527,
                                           
"y": 35.496685,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 18.377821,
                                           
"y": 64.402565,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 132.26006,
                                           
"y": 66.20918,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 131.6575,
                                           
"y": 36.098892,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 131.35623,
                                           
"y": 36.399994,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
}
                                   
],
                                   
"zoneType": "ZONE"
                               
},
                               
{
                                   
"name": "Zone1",
                                   
"zoneCoordinate": [
                                       
{
                                           
"x": 181.66928,
                                           
"y": 40.31433,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 182.27184,
                                           
"y": 70.12353,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 217.21982,
                                           
"y": 70.42463,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 216.61728,
                                           
"y": 40.91654,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
}
                                   
],
                                   
"zoneType": "ZONE"
                               
},
                               
{
                                   
"name": "Zone2",
                                   
"zoneCoordinate": [
                                       
{
                                           
"x": 221.13641,
                                           
"y": 42.12095,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 221.73895,
                                           
"y": 70.12353,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 254.27675,
                                           
"y": 70.72573,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
},
                                       
{
                                           
"x": 253.97546,
                                           
"y": 42.12095,
                                           
"z": 0,
                                           
"unit": "FEET"
                                       
}
                                   
],
                                   
"zoneType": "ZONE"
                               
}
                           
],

Hi Matt,

I am also using the same maps request but zone list is empty. Please share with me if you find any parameter or any other way to get zone details.

Regards.

matfarre
Frequent Contributor

Hi Tolga,

I am using the DevNet CMX sandbox for testing.  The sandbox is running CMX version 10.2.3-23 on  https://msesandbox.cisco.com:8081/  learning/learning.  After re-sync'd with Prime, to override existing maps to get the default map configuration, I added two new zones to DevNetCampus > DevNetBuilding > DevNetZone.  The floor map inclusion area is default from creating the map in Prime.  The GET  https://devnetapi.cisco.com/sandbox/mse/api/config/v1/maps  returns the two new zones for DevNetZone. 

Please, let us know the configuration you are running and the steps to get zone details.

Thanks,

Matt

matfarre
Frequent Contributor

Tolga,

Resource /api/config/v1/maps/info/$campusName/$buildingName/$floorName, using query parameters of campusName (required), and buildingName (optional), and floorName (optional) returns map information on floor, such as dimensions, zones, APs, etc.

Matt

Hi Matt,

I am also using the same url. I can get all details except Zones. It is always empty. But I can see zone details when I get Clients list.

Should I do any configuration on CMX or Prime?

Thanks.

matfarre
Frequent Contributor

Hi Tolga,

Sorry you're having problems.  I will forward the information to the CMX engineering folks, maybe a bug. 

Which version of CMX 10 are you running?

When were the zones created, on Prime, or CMX, or imported from previous MSE installations?

Thanks,

Matt

cara.kreck
Beginner

Hi Matt,

I am also having the same problem. The zones field in the API output just says null. I do not know whether the zones were created in CMX or Prime, as I did not set up the system and the person who did is now on leave. I do also have ssh access to the server with the cmxadmin group permissions. Can I get the zone coordinates from there? Where would this information be stored?

Here is the version information:

"cmx_image_version": "CISCO_CMX-10.2.2-340.cmx",

"cmx_rpm_versions": [

"cisco_cmx_connect-10.2.2-187",

"cisco_cmx_wips-10.2.0-96",

"cisco_cmx-10.2.2-510"

Thanks,

Cara

matfarre
Frequent Contributor

Tolga and Cara,

I have submitted a query to the CMX support team.  I will follow-up with any information soon.

Thanks,

Matt

matfarre
Frequent Contributor

Hi Tolga and Cara,

Please provide a screenshot of the CMX UI page of Manage>Locations>Zones showing that the zones are actually setup and present in the current maps, similar to attached.

Thanks,

Matt

matfarre
Frequent Contributor

Here's another API resource to try.

Get list of all of the zones and a reference ID for the Zone

http://<mse_ip>/api/config/v1/heterarchy/allUserLevels?filterElements=false

Matt

View solution in original post

Great, that one works for me! I take it that you don't need my screenshot any more?

The output of this API has a less convenient structure than the other one, but it's definitely better than nothing.

Thanks for your help,

Cara

matfarre
Frequent Contributor

Cara,

That's good!  If I hear anything new about this issue from the CMX engineering team I will definitely let you know.

Matt

Hi Matt,

How do i get a list of the maps/zones and the relevant reference id, so that we can download a particular map?

I have used https://mseipapi/config/v1/maps/imagesource/domain_0_1459298630151.jpg to download a map, but need a name to id mapping.

Cheers,

Peter.

Hi Matt,

Thank you very much for your answer. That works for me.

Thanks again.

Content for Community-Ad

This widget could not be displayed.