Magento API – resources method

Still didn’t gave up on this, following is the update on my progress. I have created in magento 3 types of roles, admin, read only and customer. I wanted to check what is the difference from the API point of view. I have browsed the documentation (rather a brief list then documentation) and have found in Magento Core API the “resources” method.

Docs says:

return list of available API resources and methods allowed for current session.

The session is our user and it’s rights (roles) so this can help my application find out what functionality currently logged user can have, so far so good. I have created new request object and send it to the gateway. In response I got this:


<methodResponse>
  <params>
    <param>
      <value>
        <array>
          <data/>
        </array>
      </value>
    </param>
  </params>
</methodResponse>

First I thought that I haven’t applied roles correctly, but when I have checked n-th time I started to search solution in the magento forum. Luckily, if I may say that, I wasn’t the only that suffered from this, luckily someone fix that but it involves modifying magento core files.

This thread explains what and where, unfortunately with every new installation you will have to do it again, unless magento team will fix it.

This entry was posted in magento, xml-rpc and tagged , , . Bookmark the permalink.