09-30-2024 01:45 AM - edited 09-30-2024 01:50 AM
Hello,
I'm attempting to create a building using the API.
Here is my POST request:
```json
{
"type": "building",
"site": {
"area": {
"name": "Dan api test",
"parentName": "Global"
},
"building": {
"name": "The Dursleys",
"address": "Privet Drive 4",
"parentName": "Dan api test",
"latitude": "1337",
"longitude": "1338"
}
}
}
```
I receive an HTTP 202 response, but when I check the job, I get the following message:
"{\n \"bapiErrorResponse\" : {\n \"bapiKey\" : \"50b5-89fd-4c7a-930a\",\n \"bapiName\" : \"Create Site\",\n \"bapiErrorCode\" : \"\",\n \"bapiErrorMessage\" : \"\"\n },\n \"componentErrorResponse\" : [ {\n \"compId\" : \"uuid4b784701\",\n \"compName\" : \"GET Location info\",\n \"compErrorCode\" : \"500\",\n \"compErrorMessage\" : \"Connection Timed Out. Please check if proxy is configured. Cause : processAsyncFailureResponse(): Rest execution failed with error; exception details: connect timed out\",\n \"componentType\" : \"REST_CLIENT\"\n } ]\n}",
"runtimeInstanceId": "DNACP_Runtime_64876fdf-70fd-4a4e-98b2-86bbfeba4950"
No new building is added and i dont know where to go from here. I can add that I succesfully added the "Area" using the API but cant add buildings.
Solved! Go to Solution.
09-30-2024 03:52 AM
Thank you once more!
I managed to get it working by specifying the country option. It seems it had difficulty pinpointing the address correctly without the country information, hence the GET Location operation.
09-30-2024 03:04 AM
Not sure this is the 'same' issue https://community.cisco.com/t5/controllers/cisco-dna-center-api-problems-creating-buildings-sites/td-p/4478190
09-30-2024 03:11 AM
Thank you for the response.
I have also attempted using an actual address with the correct longitude and latitude, but the outcome remains the same.
The DNA server is not directly connected to the internet. Could the GET Location operation be related to the timing out issue? For instance, is the DNA server attempting to download some map data from the internet?
09-30-2024 03:22 AM
@klerb good call, that make sense, as the error "Connection Timed Out. Please check if proxy is configured. Cause : processAsyncFailureResponse(): Rest execution failed with error; exception details: connect timed out" suggests that your server is trying to make an external connection to retrieve location information, but it's unable to do so due to the lack of internet connectivity.
Thus the server is attempting to download map data or access an external geocoding service to validate the address and retrieve the latitude and longitude coordinates. If the server is not able to access the internet, this operation would indeed time out.
About System Settings
To start using Cisco DNA Center, you must first configure the system settings so that the server can communicate outside the network, ensure secure communications, authenticate users, and perform other key tasks. Use the procedures described in this chapter to configure the system settings.
There is also a mention of external connection in the docs.
That looks like the issue.
09-30-2024 03:52 AM
Thank you once more!
I managed to get it working by specifying the country option. It seems it had difficulty pinpointing the address correctly without the country information, hence the GET Location operation.
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