cancel
Showing results for 
Search instead for 
Did you mean: 

how to integrate API of product

SOLVED

Re: how to integrate API of product

Hello,

 

If you want to know how many API into your domain, then use 

 

domain.com/swagger

 

where domain.com your domain name.

 

By using above URL you will get by default public API, after entering token you will get API list based on the token.

 

Hope it will help you.

 

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: how to integrate API of product

Hello @Manthan Dave,

Yes, exactly I have done here now, but I got error 404 not found i.e.[client is communicate with server but ser could not find what is the request ].

 

 body: '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p>The requested URL /magento2.0/rest/V1/products was not found on this server.</p>\n<hr>\n<address>Apache/2.4.18 (Ubuntu) Server at localhost Port 80</address>\n</body></html>\n' }}

 

Now what I do here, when I already have URL and permission to access the token user.

Thank you

Re: how to integrate API of product

Hi @harshita_chouhan

 

Could you please post which URL are you passing to access this ?

 

something issue with the URL only !! so post the url so its helps us to troubleshoot the issue.

if issue solved,Click Kudos & Accept as Solution

Re: how to integrate API of product

Hello @Manthan Dave,

Here is the URL, for integrate products:

http://localhost/magento2.0/rest/V1/products?searchCriterial[pageSize]=1&searchCriterial[currentPage]=1

 

 

Thanks For Response

Re: how to integrate API of product

Hi @harshita_chouhan

 

add index.php in your URL , your URL should be like this - http://localhost/magento2.0/index.php/rest/V1/products?searchCriterial[pageSize]=1&searchCriterial[currentPage]=1

 

Also can you please check this URL -  http://localhost/magento2.0/swagger

 

is swagger is loading or not , please check and confirm ?

if issue solved,Click Kudos & Accept as Solution

Re: how to integrate API of product

Hello @Manthan Dave,

 I add index.php in url like:

http://localhost/magento2.0/index.php/rest/V1/products?searchCriterial[pageSize]=1&searchCriterial[currentPage]=1

 

But after that the same error occur 404 not found.

And also done the http://localhost/magento2.0/swagger

It also show the same error.

Thank You,

Re: how to integrate API of product

Hi @harshita_chouhan

 

Looks like you are trying  localhost links in your live website.

 

localhost is only accessible with that specific system , if you access this outside it will not work !!

 

so you need to put this on server and then you can access it by ip.

 

localhost directly will not work on live.

if issue solved,Click Kudos & Accept as Solution

Re: how to integrate API of product

Hello @Manthan Dave,

Thank you for all suggestions. Smiley Happy

 

Re: how to integrate API of product

Hi @harshita_chouhan

 

Glad to know that you have resolved your issue !! if issue is resolved accept as solution so other user gets helped !!

 

let me know if you want more help on this !!

if issue solved,Click Kudos & Accept as Solution

Re: how to integrate API of product

Hello @Manthan Dave,

I have set the IP address in place of local host but its not working and gives me the error 500 internal server error. 

and when I have to install the requirements for magento and after when I right localhost/phpmyadmin in chrome it gives error which is :

 

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.


Apache/2.4.18 (Ubuntu) Server at localhost Port 80 

Where should I do wrong things so it gives me error like that.Please give me any solution for that.Thank you