{"id":91,"date":"2010-08-23T23:15:32","date_gmt":"2010-08-23T22:15:32","guid":{"rendered":"https:\/\/greladesign.co\/blog\/?p=91"},"modified":"2010-08-27T14:08:35","modified_gmt":"2010-08-27T13:08:35","slug":"magento-api-resources-method","status":"publish","type":"post","link":"https:\/\/greladesign.co\/blog\/2010\/08\/23\/magento-api-resources-method\/","title":{"rendered":"Magento API &#8211; resources method"},"content":{"rendered":"<p>Still didn&#8217;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 &#8220;resources&#8221; method.<br \/>\n<!--more--><\/p>\n<p>Docs says:<\/p>\n<blockquote><p>return list of available API resources and methods allowed for current session. <\/p><\/blockquote>\n<p>The session is our user and it&#8217;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:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\n&lt;methodResponse&gt;\r\n  &lt;params&gt;\r\n    &lt;param&gt;\r\n      &lt;value&gt;\r\n        &lt;array&gt;\r\n          &lt;data\/&gt;\r\n        &lt;\/array&gt;\r\n      &lt;\/value&gt;\r\n    &lt;\/param&gt;\r\n  &lt;\/params&gt;\r\n&lt;\/methodResponse&gt;\r\n\r\n<\/pre>\n<p>First I thought that I haven&#8217;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&#8217;t the only that suffered from this, luckily someone fix that but it involves modifying magento core files.<\/p>\n<p><a href=\"http:\/\/www.magentocommerce.com\/boards\/viewthread\/41846\/\">This thread<\/a> explains what and where, unfortunately with every new installation you will have to do it again, unless magento team will fix it. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Still didn&#8217;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 &hellip; <a href=\"https:\/\/greladesign.co\/blog\/2010\/08\/23\/magento-api-resources-method\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":""},"categories":[4,8],"tags":[300,15,23],"_links":{"self":[{"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/posts\/91"}],"collection":[{"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":5,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/posts\/91\/revisions"}],"predecessor-version":[{"id":124,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/posts\/91\/revisions\/124"}],"wp:attachment":[{"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/media?parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/categories?post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/tags?post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}