Skip to content

jkb2121/hello_magento

Repository files navigation

Hello_Magento

Intro:

This is my "Hello World" for hacking around with the Magento2 REST API's. Apparently, these are Oauth1. Magento2 also offers an xmlrpc API endpoint, too.

##Reference:

  • Requests-oauthlib basically does oauth 1 and 2 on top of Requests. Cool!
  • Magento 2 API Status Codes (and a few samples) here
  • Magento Commerce All API Endpoints: swagger
  • It it mandatory to pass "?searchCriteria[page_size]=" into the API calls where you get a list. Per this link anyway. Otherwise, it fails with a parameter not found eror.
    • If we have to pass a page_size, we'll need to remember to implement a loop to go through the pages.
  • Another article about Magento 2 API talking about different types of authentication and token generation.
  • Encode the JSON string from json.dumps() into utf-8 with this: line.encode('utf-8')
  • Oauth2 example of hitting REST endpoint, but abandoned because Magento is Oauth1
  • Another example of Oauth2 token generation.
  • GitHubGist - A Magento REST API example with rauth.

##TODO:

  • Enable Magento2 API endpoints: tutoria
  • (Not used) Authenticate with Python Rauth
  • Observe and Report: Get list of all customers, all attributes, specific attribute
  • Start Breaking Stuff: Use a POST or a PUT or a DELETE to manipulate data in Magento Database.
  • Add a specific attribute to a specific SKU or product given a product or sku ID.
  • What is special about https://jeff.mh./swagger?apiKey=products#/catalogProductRenderListV1
  • Why is a "callback url" in the API integrations setup, and what purpose does that serve?

About

Hacking around with the Magento API's

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages