Magento 2 Accessing the API

I have installed a copy of Magento 2 locally on my computer and what I want to do is to set it up so that I can access the whole thing as a Rest Api.

I have tried some url's like: http://127.0.0.1/magento/rest/v1/products but I don't get any json.

How can I set this up so I can access the api from my browser url?
LVL 1
error2013Asked:
Who is Participating?
 
leakim971PluritechnicianCommented:
from documentation :
part 1 : create a user able to use web services
https://devdocs.magento.com/guides/v2.0/get-started/bk-get-started-api.html

How do I get started?
You must register a web service on Magento Admin. Use the following general steps to set up Magento to enable web services.

If you are using token-based authentication, create a web services user on Magento Admin by selecting System > All Users > Add New User. (If you are using session-based or OAuth authentication, you do not need to create the new user in the Admin.)
Create a new integration on Magento Admin. To create an integration, click System > Integration > Add New Integration. Be sure to restrict which resources the integration can access.
Use a REST or SOAP client to configure authentication.

part 2 : doing the request
https://devdocs.magento.com/guides/v2.0/get-started/rest_front.html

The caller issues an HTTP request, which contains the following elements:

An HTTP header that provides authentication and other instructions
A verb, which can be one of GET, POST, PUT, or DELETE.
An endpoint, which is a Uniform Resource Indicator (URI) that identifies the server, the web service, and the resource being acted on.
The call payload, which is set of input parameters and attributes that you supply with the request.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.