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

Error in sandbox for DNA creating new building

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
Highlighted
Cisco Employee

Re: Error in sandbox for DNA creating new building

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.

 

Cisco Employee

Re: Error in sandbox for DNA creating new building

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

That is a “dunder” as in double underscore.
Beginner

Re: Error in sandbox for DNA creating new building

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 

Content for Community-Ad
July's Community Spotlight Awards
This widget could not be displayed.