11-24-2021 07:48 AM
Hey,
I want to configure and pull through the API a report that will occur on an hourly basis. Is that available in DNAC? If so, what's the syntax that should be sent through this API command - POST /dna/intent/api/v1/data/reports in the schedule field?
Thanks in advance!
Dolev
Solved! Go to Solution.
11-24-2021 09:50 AM
I found this site to be very helpful: https://github.com/cisco-en-programmability/dnacenter_reports_operations
Client Report Detail
{
"viewId": "e8e66b17-4aeb-4857-af81-f472023bb05e",
"viewName": "Client Detail",
"description": "This client report view provides detailed information about the list of clients that are seen in the network",
"viewInfo": null,
"schedules": [
{
"type": "SCHEDULE_NOW",
"default": true
},
{
"type": "SCHEDULE_LATER",
"default": false
},
{
"type": "SCHEDULE_RECURRENCE",
"default": false
}
],
There is no hourly option today. I thought maybe a workaround is to just continuously create new reports to run NOW, but that will quickly leave you with a long list of reports that DNA is tracking, so I think you should occasionally clean up (DELETE) the old ones via API.
However, depending on what information you are trying to fetch, you may not need DNA's reporting feature. You can collect lots of information, like client device details via API at whatever frequency you run your script to build your own report. (https://github.com/cisco-en-programmability/dnacenter_device_report has an example of that)
If you think an hourly report would be valuable, please submit a "Make a Wish" in your Cisco DNA GUI
11-24-2021 09:50 AM
I found this site to be very helpful: https://github.com/cisco-en-programmability/dnacenter_reports_operations
Client Report Detail
{
"viewId": "e8e66b17-4aeb-4857-af81-f472023bb05e",
"viewName": "Client Detail",
"description": "This client report view provides detailed information about the list of clients that are seen in the network",
"viewInfo": null,
"schedules": [
{
"type": "SCHEDULE_NOW",
"default": true
},
{
"type": "SCHEDULE_LATER",
"default": false
},
{
"type": "SCHEDULE_RECURRENCE",
"default": false
}
],
There is no hourly option today. I thought maybe a workaround is to just continuously create new reports to run NOW, but that will quickly leave you with a long list of reports that DNA is tracking, so I think you should occasionally clean up (DELETE) the old ones via API.
However, depending on what information you are trying to fetch, you may not need DNA's reporting feature. You can collect lots of information, like client device details via API at whatever frequency you run your script to build your own report. (https://github.com/cisco-en-programmability/dnacenter_device_report has an example of that)
If you think an hourly report would be valuable, please submit a "Make a Wish" in your Cisco DNA GUI
11-24-2021 11:17 PM
Thank you!
Unfortunately, I couldn't find a way to make a single API call to match all clients to network devices at once, just to query each client separately. I will look into creating a report that will run now on an hourly basis, seems that it might solve the issue.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide