cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
206
Views
1
Helpful
2
Replies

DNAC Global device CLI Credential API

Salman-Abbasi
Level 1
Level 1

Hi All,

While I am trying to configure Device Global CLI credentials in DNAC through API then getting error;

SalmanAbbasi_0-1764929041068.png

SalmanAbbasi_1-1764929064998.png

I am doing this task in cisco Sandbox.

 

1 Accepted Solution

Accepted Solutions

Looking at your error, this would suggest you have an  incorrect JSON payload format or missing required parameters in your API request body. I am looking at the docs and see an example of a PUT request here https://developer.cisco.com/docs/dna-center/2-3-7-4/update-cli-credentials/ use this if you are trying to update, if you are adding from new...https://developer.cisco.com/docs/dna-center/2-3-7-4/create-cli-credentials/ 

Check your payload, aside from the docs see https://developer.cisco.com/docs/dna-center/2-3-7-4/credentials/#code 

[
  {
    "comments": "CLI Credentials for the guide - initial",
    "description": "GUIDE_CLI_CREDS_INITIAL",
    "enablePassword": "Cisco123!",
    "password": "Cisco123!",
    "username": "dnac_user_1"
  }
]

 You can try adding the [] brackets, to make this an array. 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

View solution in original post

2 Replies 2

Looking at your error, this would suggest you have an  incorrect JSON payload format or missing required parameters in your API request body. I am looking at the docs and see an example of a PUT request here https://developer.cisco.com/docs/dna-center/2-3-7-4/update-cli-credentials/ use this if you are trying to update, if you are adding from new...https://developer.cisco.com/docs/dna-center/2-3-7-4/create-cli-credentials/ 

Check your payload, aside from the docs see https://developer.cisco.com/docs/dna-center/2-3-7-4/credentials/#code 

[
  {
    "comments": "CLI Credentials for the guide - initial",
    "description": "GUIDE_CLI_CREDS_INITIAL",
    "enablePassword": "Cisco123!",
    "password": "Cisco123!",
    "username": "dnac_user_1"
  }
]

 You can try adding the [] brackets, to make this an array. 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Salman-Abbasi
Level 1
Level 1

Thanks  bigevilbeard now its working