Two separate issues:
A request to the end point doesn't work.
For instance, https://en.wikipedia.org/api/rest_v1/data/citation/mediawiki/http%3A%2F%2Fexample.com returns valid data.
However, on my machine (using vagrant)
http://dev.wiki.local.wmftest.net:8080/api/rest_v1/data/citation/mediawiki/http%3A%2F%2Fexample.com
returns
{"type":"https://mediawiki.org/wiki/HyperSwitch/errors/not_found#route","title":"Not found.","method":"get","uri":"/dev.wiki.local.wmftest.net/v1/data/citation/mediawiki/http%3A//example.com"}
This may be related to what happens when you use the GUI to generate the request:
If you select "mediawiki" from the drop down, and put "http://example.com" in the search field, and hit the "Try it out" button, it gives you the following request URL: