I am trying to create an automated documentation feature for our servers by using a Mediawiki and its API and feeding scripts on each server, but failed so far. The idea is to collect several vital data about a server by a script, create a wiki page and feed this into a central Mediawiki instance using wget as a means of transfer.
I set up a test-Wiki using Mediawiki 1.21.2 using a simple XAMPP stack on SLES11 (i intend to work on the software integration part later) and set up a user account with all rights (bureaucrat, administrator) to avoid any authentication issues for the test.
I finally wrote the following script on a test server to try creation of a wiki page:
What worked was the login- the query- and the logout-part. I get the correct answers back, the cookies/tokens are set correctly and all works correctly. Somehow, though, when i try to use the edit-token to create the new page (it doesn't exist yet) i get back the API-documentation, which indicates an error.
I checked if the API is allowed to be used at all in LocalSettings.php and include/DefaultSettings.php, but everything seems to be as it should be.
I finally found it out myself. This part of the MediaWiki documentation is somewhat poorly done, so i didn't understand immediately how to do it. IN hindsight it was a case of PEBKAC.
Solution is: once a script acquires an edit-token it has to confirm this token in a second pass to make it valid. I didn't do this in my first try, so here is a revised test-script which works against my Mediawiki (v 1.23rc3 on AIX 7.1).
This script will create/overwrite a page with the title "MyTestPage" and no text in it.
Going forward this leaves one question: how can i transmit more wiki-text? To put it all into a single URL is somewhat cumbersome and i have yet to figure out how to send the (suggested from the documentation) multipart-MIME-message with wget.
Hi,
I need to call an API (GetUsageDetails)from inside a shell script which takes an input argument acct_nbr.
The output of API will be like :
<usageAccum accumId="450" accumCaptn="PM_125" inclUnits="1410.00" inclUnitsUsed="744.00" shared="true" pooled="false" prorated="false"... (1 Reply)
I created a mediawiki page and it was completely working and I had multiple pages within it. When I edited the $wgLogo = " "; to something I wanted (I put the link to the picture within " ")
I had to edit the logo on the top right but now I can't even load any of my pages, I may have... (10 Replies)
I created a mediawiki page and it was completely working and I had multiple pages within it. When I edited the $wgLogo = " "; to something I wanted (I put the link to the picture within " ")
I had to edit the logo on the top right but now I can't even load any of my pages, I may have touched... (1 Reply)
hi everybody..
i download and untar mediawiki ... i dont know how to install mediawiki.. there is no configure ... plz help me how to do it step bu step ... (1 Reply)