36
votes
Accepted
Magento2 REST API Error 'Class does not exist'
A DocBlock is required in app/code/Test/Calculator/Api/CalculatorInterface.php as described here: http://devdocs.magento.com/guides/v2.0/coding-standards/docblock-standard-general.html
<?php
...
15
votes
Magento2 REST API Error 'Class does not exist'
In my case problem was that I used "use" clausule in interface. Magento DocBlockReflection could not handle that and was searching for interface without full namespace. So for example in bellow code:
...
11
votes
Webservicex giving wrong EUR:USD conversion
There does seem to be an issue with the WebserviceX currency conversion service. I've knocked together an extension that integrates with the fixer.io service, which can act as an alternative: https://...
7
votes
Accepted
How to log all rest api calls in magento2?
[This may not be a good way to log the Rest API]
We should try with Plugin - Magento\Webapi\Controller\Rest::dispatch():
app/code/Vendor/WebApiLog/etc/frontend/di.xml
<?xml version="1.0"?>
&...
7
votes
Accepted
How to access Magento SOAP WSDL
SOAP V1: http://magentohost/index.php/api/soap/?wsdl (this one is more like RPC, no concrete operations defined in WSDL, just call)
SOAP V2: http://magentohost/index.php/api/v2_soap?wsdl=1 . For ...
5
votes
Magento 1 - How to set HTTP Response Code in Custom REST API
You can configure the whole HTTP response with the response object from a controller:
$this->getResponse()
->clearHeaders()
->setHeader('HTTP/1.0', YOUR_STATUS_CODE, true)
->...
5
votes
Accepted
Webservicex giving wrong EUR:USD conversion
It's because of an error on webservicex website. Check this link: http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency=EUR&ToCurrency=USD It shows "-1" as response, seems ...
5
votes
Accepted
On Magento2, is it better to declare Interfaces on Api/Data before create Model and Ressource?
With service contracts usage (API interfaces), it will be possible to expose custom module functionality as web API just by adding config etc/webapi.xml. Improved capabilities for integration with 3rd ...
5
votes
Magento2 REST API Error 'Class does not exist'
Here's the checklist if you struggling with same issue:
Service interfaces should be in Api folder.
Dto interfaces should be in Api/Data folder.
All interface methods should be type hinted. (Argument ...
5
votes
How to log all rest api calls in magento2?
You can use the following FOSS module:
https://github.com/vladflonta/magento2-webapi-log
5
votes
Accepted
Magento 2.2.5- SOAP-ERROR Parsing WSDL
I tried the SOAP Web Services on my local host and it was working fine. The reason why the Magento 2 was not able to give a response to the request was because it was not able to verify SSL ...
4
votes
Accepted
getting data from external webservice
To access external webservice, you can use Zend HTTP Client class, using the below code:
protected $_httpClientFactory;
public function __construct(
\Magento\Framework\HTTP\ZendClientFactory $...
3
votes
Magento 1.x API V/s Magento 2.x API
The API has been rewritten for Magento 2. It is no longer held in separate classes. Instead, already existing classes are used to fulfill the functionality of the API. This way there is no code ...
3
votes
Magento 1 - How to set HTTP Response Code in Custom REST API
I am using the following approach please suggest me If I am using the wrong approach?
Included following class in my custom namespace
use Magento\Framework\Exception\InputException;
use Magento\...
3
votes
Currency Rate not importing from Webservicex in magento 2
WebserviceX has been down for some time now. Its API is now returning a -1 for all currency conversions.
You can test it here if you want: http://www.webservicex.net/CurrencyConvertor.asmx/...
3
votes
Accepted
Magento 2: How can I store my original REST request in a file on the server?
Serializing the object will most likely serialize the entire PHP Object. That's the reason why you end up with a massive file. You only want to log the payload from that request.
I've wrote a module ...
2
votes
Accepted
API SOAP V2 CatalogProductList Complex Filter with OR
For in complex filter you must specify value in coma separated format (without spaces): value = '34,37'.
2
votes
Currency Rate not importing from Webservicex in magento 2
Fixer.io as additional currency converter service has been added into Magento2.
2
votes
Adding new order field to API response: /V1/orders/:id without using extension_attributes
The intended mechanism by which to add attributes to existing models is via the extension_attributes mechanism. It take some work to set up, but this exposes the data consistently throughout the API (...
2
votes
Magento 1.x API V/s Magento 2.x API
From my experience, Magento 2 APIs are totally different from Magento 1 version. And, more flexible than M1.
Magento 2 API docs:
http://devdocs.magento.com/swagger/index.html
http://devdocs.magento....
2
votes
Magento 1.x API V/s Magento 2.x API
Magento2 have absolutely different implementation than in M1, so it fully incompatible.
See official documentation for more details
2
votes
Magento2 REST API Error 'Class does not exist'
Make sure below command executed successfully. Don't interrupt or hit any API call. After execution your issue will be resolved. Worked for me.
php bin/magento setup:di:compile
2
votes
Accepted
Magento 2 API vs. Web Interface vs. Web API
In this particular statement, API refers to service contracts. It is different than web APIs.
A service contract is a set of PHP interfaces that are defined for a
module. A service contract ...
2
votes
Accepted
Magento2: Web service Call POST method
I checked with above data but the credit usage exceeds for that user account, I tried with the new account it's working, please find the curl call below,
$ch = curl_init();
$url = "http://api....
2
votes
Accepted
Magento 2. Does Commerce offers more functionality than Open Source in term of Web APIs?
AFAIK, Core WebAPI Structure for both Magento 2 Commerce and Magento 2 open Source is same but Magento 2 Commerce is more optimized in terms of scalability, security.
All the Modules that are ...
2
votes
"Web services" menu is missing
I've fixed this problem.
Got to the "app\etc\modules"
Find files Mage_Api.xml Mage_Api2.xml Mage_Oauth.xml
In these files, you need to change false to true
rebuild Magento cache
2
votes
Accepted
Magento2 - rest API on custom module "items" object is not populated
as mentioned in the comments, the @return annotations to the getList function were Magento\Framework\Api\SearchResultsInterface. Creating a new interface extending from SearchResultsInterface as ...
2
votes
Accepted
Call to the “Get_Item_Quantity” function in the web service (trying to call soap api using magento restful services)
I believe you already created a custom Rest API and the only missing piece of the puzzle is API call. Although I have added all steps to create a custom API as well.
This is how I am calling SOAP API ...
1
vote
How to log all rest api calls in magento2?
You can also check this light weight API logging module
https://github.com/mosesdinakaran/magento-log
It has the below features
Able to log all the API logs
Able to log logged in users API calls
...
1
vote
How to log all rest api calls in magento2?
Check this out, under MIT license:
https://github.com/ghostunicorns/module-webapi-logs
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
web-services × 91api × 31
magento2 × 29
magento-1.9 × 26
soap × 17
rest-api × 16
module × 7
soap-api-v2 × 7
php × 6
magento-1.8 × 6
magento-1.7 × 4
service-contract × 4
javascript × 3
orders × 3
currency × 3
wsdl × 3
currency-rates × 3
database × 2
sales-order × 2
cache × 2
shipping-methods × 2
webapi × 2
integration × 2
oauth × 2
api-filter × 2