I have configured the rest api in my localhost magento. When I Hit this url, http://localhost/magento/api/rest/products
The error is:
Invalid webservice adapter specified.
I have configured the rest api in my localhost magento. When I Hit this url, http://localhost/magento/api/rest/products
The error is:
Invalid webservice adapter specified.
This errors comes from here: \Mage_Api_Model_Server::initialize
You are using the rest adapter, which is defined in app/code/core/Mage/Api/etc/api.xml
<adapters>
<soap>
<model>api/server_adapter_soap</model>
<handler>default</handler>
<active>1</active>
<required>
<extensions>
<soap />
</extensions>
</required>
</soap>
<soap_v2>
<model>api/server_v2_adapter_soap</model>
<handler>soap_v2</handler>
<active>1</active>
<required>
<extensions>
<soap />
</extensions>
</required>
</soap_v2>
<soap_wsi>
<model>api/server_wsi_adapter_soap</model>
<handler>soap_wsi</handler>
<active>1</active>
<required>
<extensions>
<soap />
</extensions>
</required>
</soap_wsi>
<xmlrpc>
<model>api/server_adapter_xmlrpc</model>
<handler>default</handler>
<active>1</active>
</xmlrpc>
<default>
<use>soap</use>
</default>
</adapters>
It might help to uncomment the line in .htaccess
############################################
## uncomment next line to enable light API calls processing
# RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L]
############################################
## rewrite API2 calls to api.php (by now it is REST only)
RewriteRule ^api/rest api.php?type=rest [QSA,L]
The following solution fixed the issue for me.
If you're sure you have the following line uncomented in .htaccess
:
RewriteRule ^api/rest api.php?type=rest [QSA,L]
...and it still does not work, then please be sure you have turned off MultiViews option in apache. For example:
<VirtualHost *:80>
ServerName magento.local
DocumentRoot "c:/www/magento"
<Directory "c:/www/magento/">
Options +Indexes +Includes +FollowSymLinks -MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
Pay attention to -MultiViews above.