As of Dradis v4.17.0 you can export and download reports via the API.
Define the Dradis-Project-Id HTTP header to choose the project to export.
POST /pro/api/reportUsed 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/:idRun 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/downloadOnce 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 →
Loading form...
Your email is kept private. We don't do the spam thing.