Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm trying to use the Magento REST API to get back a list of all products on my Megento Installation.

I've successfully authenticated using OAuth and I'm calling "LINK TO API/products" -- however it just returns me an array of empty arrays, like so:

{"11":[],"12":[],"13":[],"14":[],"15":[],"16":[],"17":[]}

11, 13, 13 etc are the ID's of the products in my store. So its certainly finding products, however it isn't sending any of the products details along with the IDs, which should be in the JSON arrays associated with the IDs.

Has anyone encountered this issue before and been able to fix it?

Below is the code I'm using to access the API.

$oauthClient->fetch($resourceUrl, array(), 'GET', array('Content-Type' => 'text/xml'));

Thanks in Advance,

Danny

share|improve this question

Danny I would check the ACL for your REST USER, sounds like you haven't given it permission to the specific fields you are looking for. Also I've noticed a bug when using the "All" will act the same as "Custom" with nothing checked.

To Get to these functions go to:

System > Web Services > REST - Attributes
  1. Select the account used for the connection [recommend Admin]
  2. Then verify the [ACL Attribute Rules]
  3. Again use Custom and select each one you want to assure they are stored.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.