Defect #32246
open[Redmine API] functionality to export whole wiki
0%
Description
I'm trying to export my whole wiki via the Redmine API, but the export whole wiki function as seen in the bottom right-hand corner when sorting by index is not working.
It is possible to export single pages via the API, but not the whole wiki, but I'd be really great to be able to backup the wiki this way in an automated fashion.
Updated by Lucas Di Pentima about 1 year ago
Hello there!
I've bumped into the same issue and with this simple patch I was able to make it work. It's super trivial and I hope it gets fixed on the next release. This was done in Redmine 4.2.10:
--- old/app/controllers/wiki_controller.rb 2023-03-05 21:35:09.000000000 +0000
+++ new/app/controllers/wiki_controller.rb 2023-08-18 15:08:22.053444624 +0000
@@ -37,7 +37,7 @@
before_action :find_existing_or_new_page, :only => [:show, :edit]
before_action :find_existing_page, :only => [:rename, :protect, :history, :diff, :annotate, :add_attachment, :destroy, :destroy_version]
before_action :find_attachments, :only => [:preview]
- accept_api_auth :index, :show, :update, :destroy
+ accept_api_auth :index, :show, :update, :destroy, :export
helper :attachments
include AttachmentsHelper
Updated by Wurzel mann 9 months ago
Sorry for my late reply, it works, thank you very much!
Updated by Adi Kriegisch 9 months ago
Great! What would it take to get this patch upstream? This only exposes the export endpoint of the wiki to API auth...
Is there a reason, wiki export isn't exposed to the API?