cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
994
Views
3
Helpful
10
Replies

What is a valid geographicalAddress?

Nathan Sowatskey
Cisco Employee
Cisco Employee

Hi

This example is based on Adam's, very useful and helpful, Postman collection here:

apic-em-samples-aradford/tools/postman at master · CiscoDevNet/apic-em-samples-aradford · GitHub

In the attached image I am trying to create a location, with the POST /location request. In this example I have a geographicalLocation value of "-34/150". I have also tried other values with varying numbers of decimal points, and also a format with a "," instead of a "/".

I have yet to find a value for geographicalLocation that works. The second image attached shows the error I am getting (note that the attempt with a comma separator gave a format error message).

So, what is an example of a geographicalLocation that does work with the 1.2 GA release please?

Many thanks

Nathan

address_example.png

address_invalid.png

1 Accepted Solution

Accepted Solutions

This bug has been reported a few weeks ago, should be fixed in the future release.

View solution in original post

10 Replies 10

yawming
Cisco Employee
Cisco Employee

Try "geographicalAddress": "37.3230/122.0322".

Quiz: where is this location :-)

I think it doesn't take minus sign ?

Quizzes are easier with Google :-).  It looks like Cupertino, but that should be "37.3230/-122.0322".  It's actually

Weihai, Shandong, China.

FYI, this works for Wollongong:

{

"locationName":"Wollongong",

"geographicalAddress":"-34.416/150.883"

}

This one did not work for me.

It looks like minus signs are an issue here.

Regards

Nathan

Not for me

{ "locationName":"Wollongong", "geographicalAddress":"-34.416/150.883" } 

  

{ "response": { "version": 1469733244499, "startTime": 1469733244499, "endTime": 1469733244695, "progress": "Adding location has failed.", "errorCode": "Inventory collection error", "serviceType": "Inventory service", "rootId": "5dee9441-023a-4ea3-b098-4c4a9de99546", "isError": true, "failureReason": "Coordinates in geographicalAddress are invalid", "id": "5dee9441-023a-4ea3-b098-4c4a9de99546" }, "version": "1.0" }

Yeah, when I looked at the task, it failed with the negative coordinate.  This looks like a bug as I can't imagine what an alternate acceptable syntax would be for S and W.

This bug has been reported a few weeks ago, should be fixed in the future release.

Then can we get the right format for N vs S, E vs W ? Looks like it doesn't take "-" sign.

Yeah, looks like the negative sign does break it.  I get a valid task ID, but it's an error.  I don't know what another valid syntax might be.  The negative sign is typical for South and West.

Thanks guys.

Addresses with positive numbers seem to work.

Negative numbers don’t.

That works for some portion of the planet, but not all …

Regards

Nathan