cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
19170
Views
22
Helpful
19
Comments
jafrazie
Cisco Employee
Cisco Employee

Please post any questions you have about using APIs on DNA Center. If you are facing an issue, please provide the following information in your post:

  • DNA Center Version (from About DNA Center menu).
  • Payload/Headers
  • Response Codes
19 Comments
wfrans
Level 1
Level 1

Hi all,

I have an issue with the REST-API interface, the DNA-C returns in HTTP in stead of JSON. I already tried the header with Content-Type:application/json and Accept:application/json.

Authentication/Authorization is ok, I receive a  X-JWT-ACCESS-TOKEN cookie. The return is in HTML in stead of JSON.


DNA-C 1.1.3

Response Status: 200

Response body: success


What am I doing wrong?

aradford
Cisco Employee
Cisco Employee

use the /api/system/v1/auth/token

API instead.  This will return JSON.

anthulule
Level 4
Level 4

 Hi,

 

I'm wondering how or when we can access the intent api's.

I see that they are listed in the 1.2.x api documentation (https://developer.cisco.com/site/dna-center-rest-api/) but i only get "No such page" responses when i test them against my DNA Center.

DNA Center version 1.2.2

jafrazie
Cisco Employee
Cisco Employee

Onboard a DNA Center, APIs are here:

https://<ip-name>/dna/apidoc

Or Gear icon (top right) --> API Documentation.

anthulule
Level 4
Level 4

We have an DNA Center cluster that I'm running the request against.

to be more specific, I'm trying to run a GET on https://dnac.internaldomain/dna/intent/api/v1/network-health against my DNA Center where dnac.internaldomain is a dns name pointing towards my dna center cluster. This request rewards me with a nice "No such page" from my DNA Center.

 

The Gear icon --> API Documentation page does not show the intent APIs so I suspect that these APIs is not implemented yet.

 

The DNA Center I'm testing against is running version 1.2.2

Should the intent APIs be available with the 1.2.2 release or are these scheduled for a later release?

yawming
Cisco Employee
Cisco Employee

1. https://dnac.internaldomain/dna/intent/api/v1/network-health is not a valid URL

2. Even we have the right URL like - https://sandboxdnac.cisco.com/dna/intent/api/v1/network-health, we still need to have the right role to execute this API.

 

You can try APIs from DNAC platform:

https://sandboxdnac.cisco.com/dna/platform/app/consumer-portal?module-view=apis

 

aradford
Cisco Employee
Cisco Employee

you need to have the DNAC Platform package installed for the "intent" API to work.

 

They are currently in EFT and are installed on the DNAC sandbox.

 

Should be GA soon.

 

Adam

ah_xsmunic
Level 1
Level 1

Hi,

 

I try to access the intent API network-health in the DNAC sandbox but only get the following response: 

 

[
    "core/utils/wrapper",
    "domReady"
]

 

Is there something I miss?

 

Thanks,

Ardi

aradford
Cisco Employee
Cisco Employee

How did you try to access?  Through POSTMAN or via the UI?


ah_xsmunic
Level 1
Level 1

Using Postman actually. If I try using the UI it gives me a 403 respond. Btw, what is the format of the startTime or endTime parameters?

aradford
Cisco Employee
Cisco Employee
On the EFT version those are not looked at, they just need to be present as query strings
ah_xsmunic
Level 1
Level 1

Does this mean we can't get the network-health API respond on the sandbox yet?

arnavane
Cisco Employee
Cisco Employee

Hi Team, I working on DNAC API integration for inventory collection. I need guidance on the “About” API for DNAC. Requirement is to get DNAC version.

 

Is any API provide the DNAC version?

 

We are planning to integrate DNAC 1.3 , 1.2.8 , 1.2.10 .

 

Thank you

wwvan
Level 1
Level 1

Hi,

 

We promised our CMDB friends that DNAC would provide a complete Hardware Inventar of the Cisco Equipment, with an easy intent API.... However now playing with the intent API's we get not further as an overview of the Modules and Supervisor..

 

We should use the command runner to get power supply, Fan, etc. out of the "system", with creating a task, run the task and read the provides File.. 

 

Is this the easiest way to fill the CMDB with CI's from DNAC?

 

Thanks for any suggestions!

lauresv75
Level 1
Level 1

Hi,

 

We are trying to figure out how we can claim an new unclaimed device via API in DNAC 1.3.0.3. With APIC-EM we created a script that automatically provisioned a new unclaimed device without knowing the Serial Number before.

The script collected all the info from the new device and info from a csv file to generate the right config for this switch.

 

Now we are migrating from APIC-EM to DNAC so we need to create a new script.

I'm currently trying to figure out how to CLAIM a new unclaimed device... 

In documentation I find how to claim a device that has been pre-provisioned, but how can I claim a device that already exists as an unclaimed device in DNAC? To claim a device I need info like a workflowId which I'm not able to find or create.

 

Any suggestions?

 

Kind regards,

Sven

 

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: