Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Body format error in ConfigurationArchive.export_device_configurations #182

Open
torbbang opened this issue Dec 6, 2024 · 1 comment
Open

Comments

@torbbang
Copy link

torbbang commented Dec 6, 2024

Prerequisites

  • [ x ] Have you tested the operation in the API directly?
  • [ x ] Do you have the latest SDK version?
  • [ x ] Review the compatibility matrix before opening an issue.

Describe the bug
A clear and concise description of what the bug is.

ConfigurationArchive.export_device_configurations fails for version 2.3.7.6 due to error in body format. The SDK reflects changes listed in API docs for the /dna/intent/api/v1/network-device-archive/cleartext endpoint, but the API still expects to get deviceId as a list and not a string like in previous versions.

Test request body(equivalent to o:
{
"deviceId": "xxxxxx-yyyyy-zzzzz",
"password": "Password1!"
}

Response:
{
"response": {
"errorCode": "BadRequest",
"message": "JSON parse error: Cannot construct instance of java.util.ArrayList (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('xxxxxx-yyyyy-zzzzz'); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of java.util.ArrayList (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('xxxxxx-yyyyy-zzzzz')\n at [Source: (PushbackInputStream); line: 2, column: 17] (through reference chain: com.cisco.apicem.config.archive.request.dto.ExportDeviceConfigWrapperDTO["deviceId"])",
"detail": "JSON parse error: Cannot construct instance of java.util.ArrayList (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('xxxxxx-yyyyy-zzzzz'); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of java.util.ArrayList (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('xxxxxx-yyyyy-zzzzz')\n at [Source: (PushbackInputStream); line: 2, column: 17] (through reference chain: com.cisco.apicem.config.archive.request.dto.ExportDeviceConfigWrapperDTO["deviceId"])"
},
"version": "1.0"
}

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
Please provide an screenshot of the successful API call with cuRL, Postman, etc.

image

Environment (please complete the following information):

  • Cisco DNA Center Version and patch: 2.3.7.6-70319
  • Python version: 3.12.6
  • SDK version: 2.7.7
  • OS Version: MacOS 15.1

Additional context
Add any other context about the problem here.

@JosePabloOcampo1212
Copy link
Collaborator

Please check if it already works in the new update of the develop branch.

Captura de pantalla 2025-01-03 a las 11 05 59 p  m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants