cancel
Showing results for 
Search instead for 
Did you mean: 

API REST: fields, count, and json format to convert to datatable

API REST: fields, count, and json format to convert to datatable

Hi, I am a newbie working with magento. 

 

I have installed it in a XAMPP portable server to develop an app.

 

I usually work with .NET and I have get success connecting Magento V2.0's api rest and getting some data with API REST and httpwebrequest .net methods.

 

I have several questions if you like to help me:

  1. For example: is there any api rest string to get total count of products
  2. How can I get a list of products with a searchCriteria but ONLY SOME COLUMNS/FIELDS from product catalog ?
  3. I think that deserialize function to convert a json string to datatable can take as a input value the json format. Could you help me for converting any json from API REST to a datatable? Can we take any json format for each API REST function ?

Hope your answer and thanks a lot.

 

Regards,

5 REPLIES 5

Re: API REST: fields, count, and json format to convert to datatable

Hi,

 

Could anybody help me a little ??   Thanks a lot 

 

Regards,

Re: API REST: fields, count, and json format to convert to datatable

hi,

 

I have some suggest for you:

1. I can't find it but you can make your API for do that.

2. This link below can help you, maybe : http://devdocs.magento.com/guides/v2.0/howdoi/webapi/search-criteria.html .

3. I can't answer this.

 

Hope them can help you.

 

Regards,

Re: API REST: fields, count, and json format to convert to datatable

Hi, thanks a lot for your answer but ....

 

1. Ok, I have already discovered that I have to extend the api. I will try to do. Is there any web page to begin with?

 

2. Thanks, I have already seen it, but it was for SEARCH CRITERIA, I want to know if I can get only some fileds of, for example, products and not.

 

3. Ok, this question is NOT about magento

 

Hope your answer about 1 (links), and 2.

 

Regards,

Re: API REST: fields, count, and json format to convert to datatable

Hi juan3211,

 

1. You can visit this: https://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/ . It's very helpful.

 

2. I found this web. It have example for product. Hope it help you: https://cyrillschumacher.com/2015/01/02/magento2---search-parameters-for-the-rest-api/.

 

Regards,

Re: API REST: fields, count, and json format to convert to datatable


@Rubelia wrote:

Hi juan3211,

 

1. You can visit this: https://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/ . It's very helpful.

 

2. I found this web. It have example for product. Hope it help you: https://cyrillschumacher.com/2015/01/02/magento2---search-parameters-for-the-rest-api/.

 

Regards,


Hi Rubelia.

 

1. I have already found it, I hope Alan publish soon an example of a magento api and not a "calculator api". Thanks a lot.

 

2. This link is also for searchCriteria, not for only retrieving some data (columns) of the api get. May be yu have to develop too a personal api to get only some data (columns). I am a bit lost with this.

 

Regards.