I'm using wso2am-1.9.1. I'm trying to run the sample app of WSO2 API manager (AM) from link : https://docs.wso2.com/display/AM170/Deploying+and+Testing+YouTube+API. As per doc, in "Building the Sample section", they've given details for "YoutubeFeeds", but actually the WSO2 AM there is no details for "YoutubeFeeds", so I am simply trying for the "WikipediaAPI", where I'm running "APIPopulator.bat" file, but it looks like it's giving me errors. Could you please let me know what's wrong here?
D:\wso2am-1.9.1\samples\WikipediaAPI>curl -X POST -c cookies http://localhost:9763/publisher/site/blocks/user/
login/ajax/login.jag -d "action=login&username=admin&password=admin"
{"error" : false}
D:\wso2am-1.9.1\samples\WikipediaAPI>curl -X POST -b cookies $SERVER/publisher/site/blocks/item-add/ajax/add.j
ag -d "action=addAPI&name=WikipediaAPI&visibility=public&version=1.0.0&description=If you want to monitor a Me
diaWiki installation, or create a bot to automatically maintain one, you can use the MediaWiki web service API
. The web service API provides direct, high-level access to the data contained in MediaWiki databases&endpoint
Type=nonsecured&http_checked=http&https_checked=https&wsdl=&tags=wikipedia,mediawiki&tier=Silver&thumbUrl=http
s://upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png&context=/wikipedia&tiersCollection=Gold&resourceCount=0&re
sourceMethod-0=GET&resourceMethodAuthType-0=Application&resourceMethodThrottlingTier-0=Unlimited&uriTemplate-0
=/*" -d 'endpoint_config={"production_endpoints":{"url":"http://en.wikipedia.org/w/api.php","config":null},"en
dpoint_type":"http"}';
curl: (6) Could not resolve host: $SERVER
D:\wso2am-1.9.1\samples\WikipediaAPI>curl -X POST -b cookies $SERVER/publisher/site/blocks/life-cycles/ajax/li
fe-cycles.jag -d "name=WikipediaAPI&version=1.0.0&provider=admin&status=PUBLISHED&publishToGateway=true&action
=updateStatus";
curl: (6) Could not resolve host: $SERVER
D:\wso2am-1.9.1\samples\WikipediaAPI>
My APIPopulate.bat file contains:
set SERVER=http://localhost:9763
curl -X POST -c cookies %SERVER%/publisher/site/blocks/user/login/ajax/login.jag -d "action=login&username=admin&password=admin"
curl -X POST -b cookies $SERVER/publisher/site/blocks/item-add/ajax/add.jag -d "action=addAPI&name=WikipediaAPI&visibility=public&version=1.0.0&description=If you want to monitor a MediaWiki installation, or create a bot to automatically maintain one, you can use the MediaWiki web service API. The web service API provides direct, high-level access to the data contained in MediaWiki databases&endpointType=nonsecured&http_checked=http&https_checked=https&wsdl=&tags=wikipedia,mediawiki&tier=Silver&thumbUrl=https://upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png&context=/wikipedia&tiersCollection=Gold&resourceCount=0&resourceMethod-0=GET&resourceMethodAuthType-0=Application&resourceMethodThrottlingTier-0=Unlimited&uriTemplate-0=/*" -d 'endpoint_config={"production_endpoints":{"url":"http://en.wikipedia.org/w/api.php","config":null},"endpoint_type":"http"}';
curl -X POST -b cookies $SERVER/publisher/site/blocks/life-cycles/ajax/life-cycles.jag -d "name=WikipediaAPI&version=1.0.0&provider=admin&status=PUBLISHED&publishToGateway=true&action=updateStatus";