Write API enabled on test wiki

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Write API enabled on test wiki

Bryan Tong Minh
Brion just enabled the write api on test wiki. See
<http://test.wikipedia.org/w/api.php?action=query&prop=revisions&meta=siteinfo&format=jsonfm>

Bryan

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: Write API enabled on test wiki

Max Semenik
On 20.05.2008, 0:15 Bryan wrote:

> Brion just enabled the write api on test wiki. See
> <http://test.wikipedia.org/w/api.php?action=query&prop=revisions&meta=siteinfo&format=jsonfm>

> Bryan

Great! He must have noticed that I started writing API editing support
for AWB:)

--
Best regards,
  Max Semenik ([[User:MaxSem]])


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: Write API enabled on test wiki

Roan Kattouw
In reply to this post by Bryan Tong Minh
Bryan Tong Minh schreef:
> Brion just enabled the write api on test wiki. See
> <http://test.wikipedia.org/w/api.php?action=query&prop=revisions&meta=siteinfo&format=jsonfm>
>  
FINALLY! ;)

Hmm, I'm currently getting blank pages for all requests to
test.wikipedia.org ...

Roan Kattouw (Catrope)

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: Write API enabled on test wiki

Roan Kattouw
Roan Kattouw schreef:
> Hmm, I'm currently getting blank pages for all requests to
> test.wikipedia.org ...
>
>  
Never mind, firewall problem. Testwiki is running extremely slow, though.

Roan Kattouw (Catrope)

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: Write API enabled on test wiki

Bryan Tong Minh
On Mon, May 19, 2008 at 11:38 PM, Roan Kattouw <[hidden email]> wrote:

> Roan Kattouw schreef:
>> Hmm, I'm currently getting blank pages for all requests to
>> test.wikipedia.org ...
>>
>>
> Never mind, firewall problem. Testwiki is running extremely slow, though.
>
> Roan Kattouw (Catrope)
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
That's because it is running of NFS on a single server. Or so I was
told two minutes ago.

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: Write API enabled on test wiki

Roan Kattouw
In reply to this post by Bryan Tong Minh
There are plans to enable the write API on the 'real' WMF wikis as well.
Currently, it's only enabled on test.wikipedia.org (but you probably got
that from the subject). If you want to test an application that uses the
write API (i.e.
action={edit,move,rollback,delete,undelete,protect,block,unblock} ), you
can do so on the test Wikipedia. It could also be an idea to organize
edit parties to test how the API and your application handle edit conflicts.

Before the write API is enabled WMF-wide, though, we need you to report
your experiences with it. If you find a bug or have a suggestion for an
improvement, please file it at Bugzilla [1] (don't forget to set
Component to API). If it's working just fine for you, we *also* want to
know: in that case please reply to or vote for bug 14210 [2]. This
doesn't just apply to action=edit (which is probably the most popular
feature), but also to the other modules.

Roan Kattouw (Catrope)

[1] https://bugzilla.wikimedia.org/
[2] https://bugzilla.wikimedia.org/show_bug.cgi?id=14210

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

API action=edit problem

Russell Blau
In reply to this post by Bryan Tong Minh
I've been testing my client code on test.wikipedia.org and having problems,
but I can't tell whether it is a problem in my code, in the API, or on the
testwiki server.

I submitted an edit to a user page using the following body in the POST
request to http://test.wikipedia.org/w/api.php (I've broken out the body
into key=value pairs to make it somewhat more readable, but there were no
line breaks in the body as submitted via http):

maxlag=5&
title=User%3AR%27n%27B%2Ftest&
text=Further+test+of+page+revision+using+API.&
format=json&
recreate=&
basetimestamp=2008-06-04T19%3A40%3A58Z&
summary=test+revision+again&
token=0a2b0e1b8d6cea730e7802b900476fa0%2B%5C&
action=edit&
minor=

This request returned an HTTP 500 status code with an empty response body;
however, the edit was successful on the wiki server.  (See
http://test.wikipedia.org/wiki/User:R%27n%27B/Test) Any ideas why I would be
getting this 500 status code instead of the expected JSON response text?

Russ Blau


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: API action=edit problem

MinuteElectron
Russell Blau wrote:

> I've been testing my client code on test.wikipedia.org and having problems,
> but I can't tell whether it is a problem in my code, in the API, or on the
> testwiki server.
>
> I submitted an edit to a user page using the following body in the POST
> request to http://test.wikipedia.org/w/api.php (I've broken out the body
> into key=value pairs to make it somewhat more readable, but there were no
> line breaks in the body as submitted via http):
>
> maxlag=5&
> title=User%3AR%27n%27B%2Ftest&
> text=Further+test+of+page+revision+using+API.&
> format=json&
> recreate=&
> basetimestamp=2008-06-04T19%3A40%3A58Z&
> summary=test+revision+again&
> token=0a2b0e1b8d6cea730e7802b900476fa0%2B%5C&
> action=edit&
> minor=
>
> This request returned an HTTP 500 status code with an empty response body;
> however, the edit was successful on the wiki server.  (See
> http://test.wikipedia.org/wiki/User:R%27n%27B/Test) Any ideas why I would be
> getting this 500 status code instead of the expected JSON response text?
>
> Russ Blau
>
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Me, Bryan and another user (who I do not recall the name of, sorry) have
also encountered this problem.  It was reported via the #wikimedia-tech
IRC channel, although I am unsure of whether it was noted or acted upon.
  As far as I am aware no bugzilla entry was opened either.  The edit
does still go through, although it is essential that data is returned
for any bot to be programmed in a reasonably effective way.

Forwarding this to wikitech-l for further investigation.

MinuteElectron.

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: [Wikitech-l] API action=edit problem

MinuteElectron
Marco Schuster wrote:
> I suspect it are the +es in the "text" field, AFAIR these should be %20,
> right?

Perhaps; " " may be encoded as "+" in URL query strings, and most URL
encoding functions do this.  But in post strings maybe "+" is not
acceptable.  I will look to see if your suggestion fixes this.

MinuteElectron.


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: [Wikitech-l] API action=edit problem

Russell Blau
"MinuteElectron" <[hidden email]> wrote:


> Marco Schuster wrote:
>> I suspect it are the +es in the "text" field, AFAIR these should be %20,
>> right?
>
> Perhaps; " " may be encoded as "+" in URL query strings, and most URL
> encoding functions do this.  But in post strings maybe "+" is not
> acceptable.  I will look to see if your suggestion fixes this.

On http://www.epstone.net/~andrew/wiki/api.php, the query string with "+"s
in it works as expected.

Russ


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: [Wikitech-l] API action=edit problem

MinuteElectron
Russell Blau wrote:

> "MinuteElectron" <[hidden email]> wrote:
>
>
>> Marco Schuster wrote:
>>> I suspect it are the +es in the "text" field, AFAIR these should be %20,
>>> right?
>> Perhaps; " " may be encoded as "+" in URL query strings, and most URL
>> encoding functions do this.  But in post strings maybe "+" is not
>> acceptable.  I will look to see if your suggestion fixes this.
>
> On http://www.epstone.net/~andrew/wiki/api.php, the query string with "+"s
> in it works as expected.
>
> Russ

Note the difference between "post" and "query" string -- I never said
that "+" is not acceptable in query strings (quite the opposite, in
fact).  But I believe that in post strings "+" is not allowed, please
correct me if I am wrong, of course.

MinuteElectron.

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: [Wikitech-l] API action=edit problem

Russell Blau
"MinuteElectron" <[hidden email]> wrote:

> Russell Blau wrote:
>> "MinuteElectron" <[hidden email]> wrote:
>>
>>
>>> Marco Schuster wrote:
>>>> I suspect it are the +es in the "text" field, AFAIR these should be
>>>> %20,
>>>> right?
>>> Perhaps; " " may be encoded as "+" in URL query strings, and most URL
>>> encoding functions do this.  But in post strings maybe "+" is not
>>> acceptable.  I will look to see if your suggestion fixes this.
>>
>> On http://www.epstone.net/~andrew/wiki/api.php, the query string with
>> "+"s
>> in it works as expected.
>>
>> Russ
>
> Note the difference between "post" and "query" string -- I never said
> that "+" is not acceptable in query strings (quite the opposite, in
> fact).  But I believe that in post strings "+" is not allowed, please
> correct me if I am wrong, of course.

I'm sorry I wasn't sufficiently precise.  What I meant was that I submitted
the exact same HTTP request as in my original message, including the "+"
characters in the request _body_, to the www.epstone.net MediaWiki
installation, and got an HTTP 200 response with a JSON text body.

Russ


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api