cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
19086
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
aradford
Cisco Employee
Cisco Employee
Sure..

This code shows an example of claiming a device based on IP-Address CDP info.
https://blogs.cisco.com/developer/dna-center-pnp-part-6

You probably want to move to site-based provisioning if possible.
https://blogs.cisco.com/developer/dna-center-pnp-5

and there is code (for per-provisioned). That is the same as unclaimed.
https://github.com/CiscoDevNet/DNAC-onboarding-tools/tree/master/PnP-BulkConfig-128

Adam
aradford
Cisco Employee
Cisco Employee

Sorry.. missed the first code link (it is in the blog)
https://github.com/CiscoDevNet/DNAC-onboarding-tools/tree/master/PnPNoSerialClaim

 

We also have a new python SDK... https://blogs.cisco.com/developer/using-cisco-dna-center-sdk

lauresv75
Level 1
Level 1

Hi Adam,

 

Thanks for your feedback!

I've been looking at all this information and what we need is a PnPNoSerialClaim but using a template not a static config file.

I have a small flow chart about how the script was working with APIC-EM, where we used a template from which we created a template-config. But in DNAC I can't find a template to start from...

 

pnp-flow.png

 

How should we handle this?

 

Regards,

Sven

Robert Saurer
Level 1
Level 1
Hi!

I cannot create Anycast Gateways in DNA Center 2.3.3.5 via API calls if there is already another Anycast Gateway with the same VLAN name in a different Fabric Site. Works in GUI, fails via API.

Is this a bug or am I doing something wrong?

Creating the first Anycast Gateway succeeds
REQUEST
POST https://dnac.lab.loc/dna/intent/api/v1/business/sda/virtualnetwork/ippool
{
    "siteNameHierarchy": "Global/Europe/France/Paris",
    "virtualNetworkName": "OFFICE_VN",
    "isLayer2Only": false,
    "ipPoolName": "PAR_DATA",
    "autoGenerateVlanName": false,
    "vlanId": "10",
    "vlanName": "DATA",
    "trafficType": "Data"
}

RESPONSE
200 OK
{
    "status": "success",
    "description": "IP Pool successfully added in Virtual Network in SDA Fabric.",
    "taskId": "7b0de4a3-9f8f-4467-843c-5c80a3c9a444",
    "taskStatusUrl": "/dna/intent/api/v1/task/7b0de4a3-9f8f-4467-843c-5c80a3c9a444",
    "executionStatusUrl": "/dna/intent/api/v1/dnacaap/management/execution-status/eb7bec51-036d-4f5e-a3be-ea26624327a6",
    "executionId": "eb7bec51-036d-4f5e-a3be-ea26624327a6"
}
Creating a second with the same VLAN name fails
REQUEST
POST https://dnac.lab.loc/dna/intent/api/v1/business/sda/virtualnetwork/ippool
{
    "siteNameHierarchy": "Global/Europe/Austria/Vienna",
    "virtualNetworkName": "OFFICE_VN",
    "isLayer2Only": false,
    "ipPoolName": "VIE_DATA",
    "autoGenerateVlanName": false,
    "vlanId": "10",
    "vlanName": "DATA",
    "trafficType": "Data"
}

RESPONSE
400 Bad Request
{
    "status": "failed",
    "description": "'namespace'",
    "taskId": null,
    "taskStatusUrl": "/dna/intent/api/v1/task/null",
    "executionStatusUrl": "/dna/intent/api/v1/dnacaap/management/execution-status/5e6615c3-1e38-4133-a0bb-a5a095723a3c",
    "executionId": "5e6615c3-1e38-4133-a0bb-a5a095723a3c"
}
When changing vlanName to a unique value it succeeds...
REQUEST
POST https://dnac.lab.loc/dna/intent/api/v1/business/sda/virtualnetwork/ippool
{
    "siteNameHierarchy": "Global/Europe/Austria/Vienna",
    "virtualNetworkName": "OFFICE_VN",
    "isLayer2Only": false,
    "ipPoolName": "VIE_DATA",
    "autoGenerateVlanName": false,
    "vlanId": "10",
    "vlanName": "DUMMY_NAME",
    "trafficType": "Data"
}

RESPONSE
200 OK
{
    "status": "success",
    "description": "IP Pool successfully added in Virtual Network in SDA Fabric.",
    "taskId": "576cc5b2-bd7d-4a49-b6a6-b3053369bf36",
    "taskStatusUrl": "/dna/intent/api/v1/task/576cc5b2-bd7d-4a49-b6a6-b3053369bf36",
    "executionStatusUrl": "/dna/intent/api/v1/dnacaap/management/execution-status/f9960b7a-9333-45d0-bfc1-be9c2bda5ec9",
    "executionId": "f9960b7a-9333-45d0-bfc1-be9c2bda5ec9"
}


 

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: