Export and reports endpoint

As of Dradis v4.17.0 you can export and download reports via the API.

Exports belong to a Project

Define the Dradis-Project-Id HTTP header to choose the project to export.

POST /pro/api/report

Used to start the export of a given project to a given template via API to generate a report.

Accepted Parameter Use
exporter Defines the exporter to use for project exports via API. Valid values are word or excel.
scope (optional) Defines the scope of project content to be exported in an API call, e.g. published.
template The report template into which to export the project. Pass this the report template filename with extension.

Sample request:

curl -X POST -k \
  -H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"' \
  -H 'Dradis-Project-Id: 1' \
  -F 'exporter=word' \
  -F 'scope=published' \
  -F 'template=dradis_template-welcome.v0.11.docx'  \
  http://dradis-pro.dev/pro/api/report

GET /pro/api/report/:id

Run the following curl command to query the state of the running job:

curl -k \
  -H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"' \
  -H 'Dradis-Project-Id: 1' \
  http://dradis-pro.dev/pro/api/report/1

GET /pro/api/report/:id/download

Once the state is completed, download the report by running the following curl command:

curl -k \
  -H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"' \
  -H 'Dradis-Project-Id: 1' \
  {download URL}
  -O -J

Replace {download URL} accordingly.

Next help article: Nodes endpoint →

Seven Strategies To Differentiate Your Cybersecurity Consultancy

You don't need to reinvent the wheel to stand out from other cybersecurity consultancies. Often, it's about doing the simple things better, and clearly communicating what sets you apart.

  • Tell your story better
  • Improve your testimonials and case studies
  • Build strategic partnerships

Loading form...

Your email is kept private. We don't do the spam thing.