cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1374
Views
5
Helpful
3
Replies

Error in sandbox for DNA creating new building

Victor Munoz
Level 1
Level 1

Hi,

 

I've executed a single POST to DNA sandbox to create a building for an existent area.

I get an HTTP202, but the execution status URL is an internal one that I can't check.

 

POST: 

https://sandboxdnac.cisco.com/dna/system/api/v1/site
 

My body:

{
    "type": "building",
    "site": {
    	"area": {
    		"name": "Roma",
    		"parentName": "Global"
    	},
        "building": {
            "name": "Casa pepa",
            "address": "Carrer Pepa 1, Roma"
        }
    }
}

 

Anyone can help? Any ideas?

 

Currently cisco sandbox is the only environment I have available to code.

 

 

Thanks in advance,

3 Replies 3

yawming
Cisco Employee
Cisco Employee

If you got 202 you are good. It's accepted.

You can use GET dna/intent/api/v1/site-health API to check if site is created. But since you are using always on, there are some limitation for using API. Suggest you to reserved a hardware lab.

 

I can see a site called Roma wonder if you created that one.

 

aradford
Cisco Employee
Cisco Employee
You need to add a __runsync header to get a sync response.
__runsync : true

That is a “dunder” as in double underscore.

Johannes_Grimm
Level 1
Level 1

Hi Victor,

 

after your Post-Request you'll get a return code like

 

{
"executionId" : "d97066a3-7b0d-4156-a214-fbcf71302f89",
"executionStatusUrl" : "https://10.10.20.103/api/dnacaap/v1/dnacaap/management/execution-status/d97066a3-7b0d-4156-a214-fbcf71302f89",
"message" : "The request has been accepted for execution"
}

 

Replacing the internal IP 10.10.20.103 with sandboxdnac.cisco.com in the url works for me.

 

In the example above it will look like:

 

https://sandboxdnac.cisco.com/api/dnacaap/v1/dnacaap/management/execution-status/d97066a3-7b0d-4156-a214-fbcf71302f89

 

Best regards,

Johannes 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: