Download "Debrief" PDF report via API #2658
-
Hello everyone, I am working with CALDERA for quite a while now. Currently I am trying to write small helper scripts that allow the automation of CALDERA tasks and ease its usage, e.g. to allow inexperienced users to run operations using the command line. I have used the official api documentation, the Swagger UI and its APIv2 documentation to write my scripts and so far everything works as expected (sidenote: If I am not mistaken, the official api documentation is a little outdated). Now my question: Is it possible to download the PDF report generated by the debrief-plugin via the API? I did not find any info about this and looking into the code of the debrief-plugin I did not find a quick and simple way to integrate the functionality into a python script for simple execution without the UI. Thank you for any suggestions and answers! Update (1): By inspecting the respective buttons in the debrief user interface I found out, that by clicking the button a downloadPDF/downloadJSON java script (I think) function is called. Following the function I got to the following requests to the API:
I found out some other thing following the funciton calls and with the knowledge of CALDERA I have so far I tried the following call to the API: Still open and happy for any suggestions or answers 😃 Update (2): I managed to download the JSON report via curl/api with the following command: Executing the same curl command with When executing So.. now my follow up question would (still) be how to easily access and download the PDF report from CALDERA 😄 I do not really believe that I am on the right track here and a more straight forward method does exist. Thank you for reading and any answers/suggestions! Edit: I am aware of the possibility to download the json report via curl |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@L015H4CK Good notes. Do you want to open feature requests for these so we can track? (as theyre pretty reasonable requests). And yes the "ReadTheDocs" for the REST API is not updated as per note on that page: Note: The original REST API has been deprecated. The new REST API v2 has been released, with documentation available here after server startup. Alternatively, this can be viewed by scrolling to the bottom of the CALDERA navigation menu and selecting “api docs.” |
Beta Was this translation helpful? Give feedback.
@L015H4CK Good notes. Do you want to open feature requests for these so we can track? (as theyre pretty reasonable requests).
And yes the "ReadTheDocs" for the REST API is not updated as per note on that page:
Note: The original REST API has been deprecated. The new REST API v2 has been released, with documentation available here after server startup. Alternatively, this can be viewed by scrolling to the bottom of the CALDERA navigation menu and selecting “api docs.”