Daily Sheduled XAR export

Hello,
After a lot of research, I didn’t found anything for my problem, and I turn to you then:
My task is to export to .Xar every day to sort them using a powershell script in a second step.
I first tried to use the xar export link via the browser and use it in a powershell script, but it failed.
I then tried to use extensions to perform the export, but I can’t find anything to do this.
I am a complete neophyte and am not comfortable with complex technical language.
Do you have any idea how to do this?


Bonjour,
Après pas mal de recherches, je n’ai rien trouvé à ce sujet, et je me tourne alors vers vous:
J’ai pour tâche de faire un export en .Xar tous les jours pour les trier à l’aide d’un script powershell dans un second temps.
J’ai tout d’abord tenté d’utiliser le lien d’export xar via le navigateur et l’utiliser dans un script powershell, mais cela a échoué.
J’ai ensuite tenté d’utiliser des extensions pour effectuer l’export, mais je ne trouve rien permettant de faire cela.
Je suis totalement néophyte et ne suis pas à l’aise avec un langage technique complexe.
Auriez-vous une idée de comment procéder?

Regards,
Merci beaucoup,

Hi @HeartBtz,

If you try to get the file from the URL without proper permissions, you will face the 500 error since the download would be forbidden.
It would be better if you keep yourself logged in XWiki through the browser and set the download path for the browser and use the following command to download the file automatically through powershell or batch script.
start chrome "http://XAR-EXPORT-URL"

Cheers.

Hi! @ginpachi
Thanks for ur answer!

I first thought of doing something like this, but if the session is closed, Chrome won’t be able to launch like that, will it?
shouldn’t a solution via an xwiki extension work better?

anything else ? :confused:

Thanks

Sorry @HeartBtz. :frowning:

I don’t have anything else in mind that can work. I haven’t come across any extension that fulfills your particular use case. Some experienced XWikiers might know.
You can ask them directly on Riot.im (https://dev.xwiki.org/xwiki/bin/view/Community/Chat).

XAR export require admin right which mean it requires you to be authenticated as @ginpachi indicated and by default you can use BASIC auth with XWiki which should be possible with any HTTP client. I don’t have any experience with powershell script but usually you can do BASIC auth using URLs like https://user:pass@myhist/xwiki/...