Magento – where to find Magento 2 API docs

apimagento-2.1magento2rest apiwebapi

Finally I found out the magento 2 api endpoint for all products as below

rest/V1/products?searchCriteria[pageSize]=20

but I need more detailed docs about api endpoints which I coudn't find out yet. Is there magento have detailed docs about REST API ?

Best Answer

where to find Magento 2 API docs?

Magento Commerce for B2B Generate a local REST API reference

  • The REST documentation on the Magento devdocs website is generated with Swagger UI using a schema derived from the latest build of Magento 2.
  • However, the REST API documentation on devdocs is static in that the Magento Developers website is not running an instance of
    Magento, and there is no live data.

    http://magento_host/swagger

  • By default, Magento returns documentation for resources available to anonymous users. If you specify a valid value in the api_key text box in the upper right corner, Swagger returns documentation for all the APIs the user has access to. To generate an API key, call the POST /V1/integration/customer/token or POST /V1/integration/admin/token as directed in Token-based authentication.

  • The generated Swagger documentation provides the capability to test REST API requests. A user can enter a sample request, then press the Try it out! button, and Swagger returns information such as a curl command, a request URL, a response body, a response code, and the response header. The Try it out! button will not work unless a bearer authorization token has been specified.

    https://devdocs.magento.com/swagger/

    [ base url: /index.php/rest/default , api version: 2.2 ]

Updated

domain.com/rest/all/schema?services=all
Related Topic