cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1364
Views
15
Helpful
4
Replies

Cisco DNA and missing API-calls

trondaker
Level 3
Level 3

Hi,

Trying to automate the whole process of migrating a branch to SDA. I seem to be missing some calls though, that are important to get the whole way. Version 2.2.2.3.

 

How do i provision a device once discovery is done? I can assign to site, but not provision?

 

How can i add a transit-pool to a fabric-transit? Is this a subcall under add_border?

 

Btw, im using this sdk:

https://dnacentersdk.readthedocs.io/en/latest/api/api.html#dnacenterapi-v2-2-2-3

And the calls could be better documented, so possibly i am missing something here.

1 Accepted Solution

Accepted Solutions

Aninda Chatterjee
Cisco Employee
Cisco Employee

We introduced provision APIs (for both wired and wireless) and this should be available in 2.2.2.3/2.2.2.4 (as well as 2.2.3.x). The API (for wired) is '/dna/intent/api/v1/business/sda/provision-device'.

 

There is a bug with the API where you will get a failed status, but the actual provisioning will go through. The result may be something like this (for a wired device):

 

{
"status": "failed",
"description": "No JSON object could be decoded",
"taskId": "122d8a2a-dc34-4759-966c-b22f006f72e7",
"taskStatusUrl": "/dna/intent/api/v1/task/122d8a2a-dc34-4759-966c-b22f006f72e7",
"executionStatusUrl": "/dna/intent/api/v1/execution-status/d7971672-3323-49b5-bb3c-06a3f47f9edc",
"executionId": "d7971672-3323-49b5-bb3c-06a3f47f9edc"
}

 

But you'll see all the necessary provisioning configuration pushed to the device. Please note though, the template option from the UI is de-coupled in the APIs. This API only provisions a device to a particular site, and pushes relevant site specific configuration to it. If you'd like to provision a dayN template as well, there is a separate API for it which can be used.

 

We do not have APIs for transit network creation, unfortunately. Several others are missing as well. Please feel free to continue to post here and I can validate if a specific API is truly missing or you just haven't found it.

 

Cheers,

Aninda

 

 

View solution in original post

4 Replies 4

balaji.bandi
Hall of Fame
Hall of Fame

Not sure if this helps you : here is cisco dev link, which is updated based on the available features as i know :

 

https://developer.cisco.com/docs/dna-center/#!cisco-dna-2-2-3-api-overview

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Mike.Cifelli
VIP Alumni
VIP Alumni

I always refer to the link @balaji.bandi shared.  Within DNAC you can also use the make-a-wish for missing APIs that would be beneficial to have.  Lastly, ping your Cisco rep for roadmapped API plans.

Aninda Chatterjee
Cisco Employee
Cisco Employee

We introduced provision APIs (for both wired and wireless) and this should be available in 2.2.2.3/2.2.2.4 (as well as 2.2.3.x). The API (for wired) is '/dna/intent/api/v1/business/sda/provision-device'.

 

There is a bug with the API where you will get a failed status, but the actual provisioning will go through. The result may be something like this (for a wired device):

 

{
"status": "failed",
"description": "No JSON object could be decoded",
"taskId": "122d8a2a-dc34-4759-966c-b22f006f72e7",
"taskStatusUrl": "/dna/intent/api/v1/task/122d8a2a-dc34-4759-966c-b22f006f72e7",
"executionStatusUrl": "/dna/intent/api/v1/execution-status/d7971672-3323-49b5-bb3c-06a3f47f9edc",
"executionId": "d7971672-3323-49b5-bb3c-06a3f47f9edc"
}

 

But you'll see all the necessary provisioning configuration pushed to the device. Please note though, the template option from the UI is de-coupled in the APIs. This API only provisions a device to a particular site, and pushes relevant site specific configuration to it. If you'd like to provision a dayN template as well, there is a separate API for it which can be used.

 

We do not have APIs for transit network creation, unfortunately. Several others are missing as well. Please feel free to continue to post here and I can validate if a specific API is truly missing or you just haven't found it.

 

Cheers,

Aninda

 

 

Might have overlooked this, but maybe this is it for provision:

 

provision_wired_device(deviceManagementIpAddress=None, siteNameHierarchy=None, headers=None, payload=None, active_validation=True, **request_parameters)

 

I will give it a go - i guess the SDK arent fully up to date on the actual API, but i can write a wrapper for the things that are missing. Would be good to get the transit-piece in there though, as it creates this manual hickup i would like to avoind for hundreds of sites  

 

Thanks guys!