cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
210
Views
0
Helpful
2
Replies

CDO API returns empty response

NiclasAndersen
Level 1
Level 1

i am using the CDO (SCC) API to onboard a FTD with serial number with ZTP, but when i send my post request with the data below

{
  "fmcAccessPolicyUid": "<access_policy_uid>",
  "licenses": "[BASE]",
  "name": "<device_name>",
  "serialNumber": "<device_serial>",
  "adminPassword": "<admin_password>"
}
 
and these headers
{
        "Content-Type": "application/json",
        "Accept": "application/json",
        "Authorization": "Bearer <api_key>" 
}
 
when i get my response back i get a 400 client error, but no other error messages i have used this documentation https://developer.cisco.com/docs/cisco-security-cloud-control/onboard-ftd-device-using-zero-touch-provisioning/
and that says that i should look at the error the API is giving me, but i don't get any error messages i have tried the request in both Postman and in pure python where i copy paste the example from the documentation, any help would be appreciated
1 Accepted Solution

Accepted Solutions

Marcel Zehnder
Spotlight
Spotlight

Hi 

I don't know the API and have never used it, so this is just a guess. However, based on the documentation, it seems that 'licenses' is an enum. Therefore, I think you should try using a string as the value instead of a list
enum = ["BASE", "CARRIER", "MALWARE", "THREAT", "URLFilter"]

{
  "fmcAccessPolicyUid": "<access_policy_uid>",
  "licenses": "BASE",
  "name": "<device_name>",
  "serialNumber": "<device_serial>",
  "adminPassword": "<admin_password>"
}

 

View solution in original post

2 Replies 2

Marcel Zehnder
Spotlight
Spotlight

Hi 

I don't know the API and have never used it, so this is just a guess. However, based on the documentation, it seems that 'licenses' is an enum. Therefore, I think you should try using a string as the value instead of a list
enum = ["BASE", "CARRIER", "MALWARE", "THREAT", "URLFilter"]

{
  "fmcAccessPolicyUid": "<access_policy_uid>",
  "licenses": "BASE",
  "name": "<device_name>",
  "serialNumber": "<device_serial>",
  "adminPassword": "<admin_password>"
}

 

Thank you so much it worked i thought i had tried that but obviously not