Search code examples
openproject

Exporting OpenProject WorkPackage via API


We want to generate our own progress page, and really like the pdfs that can be generated by the export feature or with the link: "/work_packages/{id}.pdf".

Sadly this link is no API link so it won't work with API keys and currently we don't really find a way to emulate the cookie based authorization openproject uses internally.

The documentation of the API seems to have mistakes, is out of date and doesn't seem to provide any export functionality.

Does anyone know if there is a working way or do i need to emulate a browser and download the pdf with automated browser input?

Thanks a lot in advance


Solution

  • As of today, the API token/OAuth based authentications don't allow access to the work package export, so for now, you are stuck to using sessions (OpenProject developer speaking).

    I'd recommend opening a ticket to improve that situation. It would also help if you could point out the mistakes in the API documentation