PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.08k stars 4.79k forks source link

Modernize PS API / webservice to support Json #14889

Open thbl opened 5 years ago

thbl commented 5 years ago

Could be usefull if prestashop supported modern json, instead of only having the difficult XML web service.

khouloudbelguith commented 5 years ago

Hi @thbl,

The API only supports XML on input but supports JSON output if you choose so:

http://KEY@site.com/api?output_format=JSON

Ping @PrestaShop/prestashop-core-developers what do you think about supporting Json?

Thanks!

thbl commented 5 years ago

@khouloudbelguith yea i know about the JSON output parameter, but don't find it usefull as there is no input. Also why is the API named webservice in prestashop ? (maby a rename would be a good ide) Think new PS users will search / look for API not webservice, and even the endpoint is called api

mrbig00 commented 5 years ago

Another improvement could be to take into the consideration of the Accept header which is an industry standard and developers would not be confused about this quirky Prestashop API

thbl commented 4 years ago

@khouloudbelguith @marionf @colinegin any news on this ?

colinegin commented 4 years ago

What do you think @eternoendless @PrestaShop/prestashop-core-developers ?

matks commented 4 years ago

Reworking the API is in the PrestaShop roadmap (see https://github.com/PrestaShop/PrestaShop/projects/1#card-13082456) but it's a massive rework.

Currently it is very hard to add improvements (including full JSON handling) to it because it has almost no documentation, there is no specs (neither functional nor technical) and zero tests ; so it's very hard to do any modifications to it without breaking something.

So when we'll start this topic, we will have to either

This makes it impossible to work on this topic as a side-project, it needs to be a primary project scheduled into a version such as 1.7.8 or 1.7.9

PierreRambaud commented 4 years ago

write a 100% new API (probably REST instead of SOAP) that will be documented and tested

Should be the best option, both API (SOAP & REST) can live together. It'll be easier to improve, document, and test the new one, when the old is untestable.

pmartin-webimpacto commented 4 years ago

This is in my opinion it's a : Must Have.

I'm thinking also on an JWT Authenticated API, and Endpoints to GET the Current Logged User Data. Examples:

hibatallahAouadni commented 3 years ago

Ping @PierreRambaud the prestashop-issue-bot delete the labels that you added :sweat_smile: I believe you need to choose one of them. Cloud you please add one of them for this issue.

PS: I add TBS label for now :wink: feel free to change it.

Thanks in advance!

PierreRambaud commented 3 years ago

You're right, I missed something, the TBS label si the good one :sweat_smile: