Coder Social home page Coder Social logo

Comments (4)

magenx avatar magenx commented on July 22, 2024

what exactly you want to see there?

There is no "Rest Api" configuration for magento. 404 will be returned, if "http://magento.dev/api/rest/products"

from magento-nginx-config.

yssource avatar yssource commented on July 22, 2024

If add the following codes in file https://github.com/magenx/Magento-nginx-config/blob/master/magento/www/magento.conf

    location /api {
        #proxy_pass http://varnish;
        rewrite ^/api/rest /api.php?type=rest last;
        rewrite ^/api/v2_soap /api.php?type=v2_soap last;
        rewrite ^/api/soap /api.php?type=soap last;
    }

It will get the result what I need.
The magento_api xml file, which looks like this

<magento_api>
...
<data_item>
<entity_id>16</entity_id>
<type_id>simple</type_id>
<sku>dress7-White-S</sku>
<color>16</color>
<size>3</size>
<description>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pharetra faucibus congue. Aenean luctus dolor et purus malesuada luctus. Quisque ullamcorper ante viverra lectus fermentum quis rutrum erat sollicitudin. Fusce tortor massa.</p>
 <p>Faucibus ut blandit cursus, varius vel mauris. Maecenas nec ullamcorper enim. Vestibulum neque leo, vehicula in consectetur sit amet, fringilla eu purus. Pellentesque egestas, felis in hendrerit porta, mauris sem pharetra ligula, sit amet ultrices enim mi ac turpis. Ut sed nisi a magna blandit imperdiet ut eu urna. Integer id enim justo. Cras nulla mauris, rhoncus at commodo ac, pretium feugiat dui. Cras ullamcorper nisl non odio congue accumsan. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aliquam erat volutpat.</p>
</description>
<short_description>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pharetra faucibus congue. Aenean luctus dolor.
</short_description>
<meta_keyword/>
<name>Dress Example Size-S</name>
<meta_title/>
<meta_description/>
<regular_price_with_tax>100</regular_price_with_tax>
<regular_price_without_tax>100</regular_price_without_tax>
<final_price_with_tax>100</final_price_with_tax>
<final_price_without_tax>100</final_price_without_tax>
<is_saleable>1</is_saleable>
<image_url>
http://magento.dev/media/catalog/product/cache/0/image/9df78eab33525d08d6e5fb8d27136e95/placeholder/default/placeholder.jpg
</image_url>
</data_item>
...
</magento_api>

from magento-nginx-config.

magenx avatar magenx commented on July 22, 2024

for me soap works either way, no need any rewrites, and rest works too if i create user/role and connect with client.

from magento-nginx-config.

yssource avatar yssource commented on July 22, 2024

It is very strange.
for me REST does not work me. when "http://mydomain/api/rest/products"
SOAP works for me, when "http://mydomain/api/v2_soap/?wsdl=1".

And In order to make both of soap and rest working for me, I have to add the following rules.

    location /api {
        rewrite ^/api/rest /api.php?type=rest last;
        rewrite ^/api/v2_soap /api.php?type=v2_soap last;
        rewrite ^/api/soap /api.php?type=soap last;
    }

from magento-nginx-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.