Why does REST API not work on my local MediaWiki?

146 Views Asked by At

I've successfully installed MediaWiki on my laptop. Here is the entry tease out.

enter image description here

As you can see, the link to this entry on my local host is http://192.168.56.1/wiki/index.php/tease_out. Then I want to use REST API to convert this page to html. The corresponding link on the online Wiktionary is https://en.wiktionary.org/w/rest.php/v1/page/tease_out/html. The desired result is

enter image description here

Then I try http://192.168.56.1/w/rest.php/v1/page/tease_out/html. But it shows

enter image description here

Could you please elaborate on this issue and how to solve it? Please let me know if you need further information.

1

There are 1 best solutions below

0
On

You make URLs wrong way. /w/ in mediawiki examples usually means mediawiki prefix, in your case it is /wiki/

http://192.168.56.1/wiki/rest.php/v1/page/tease_out/html

In URLs that you write in comments you've lost /v1/ in the path.