Help with Json API - Filtering the product list
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Re: Help with Json API - Filtering the product list
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Help with Json API - Filtering the product list
HI,
A little help whenever i run the filter
http://localhost:8000/jsonapi/product?filter[=~][product.type]=select
I get all results instead of the filtered result. Also the example in the documentation
http://localhost:8000/jsonapi/product?filter[>][product.type.code]=select
for getting products of type "select" does not return correct data.
Kindly assist
Aimeos version: 2017.10
PHP version: 7.1
Package: Laravel
Environment: Windows
A little help whenever i run the filter
http://localhost:8000/jsonapi/product?filter[=~][product.type]=select
I get all results instead of the filtered result. Also the example in the documentation
http://localhost:8000/jsonapi/product?filter[>][product.type.code]=select
for getting products of type "select" does not return correct data.
Kindly assist

Aimeos version: 2017.10
PHP version: 7.1
Package: Laravel
Environment: Windows
Re: Help with Json API - Filtering the product list
If you put that into the address line of you browser, the "=~" will be interpreted as "filter[", "=" and "~][product..." which isn't passed to the server correctly. The second problem is that "product.type" is a added to the result for simplification but only "product.type.code" remains a valid search key.kisese wrote: I get all results instead of the filtered result:
http://localhost:8000/jsonapi/product?filter[=~][product.type]=select
This filter does return all products whose type is lexicographically beyond "select". In the latest Aimeos version it will return products of type "voucher", in your version it will return nothing.kisese wrote: Getting products of type "select" does not return correct data:
http://localhost:8000/jsonapi/product?filter[>][product.type.code]=select
The correct URL for pasting into the browser would be:
Code: Select all
http://localhost:8000/jsonapi/product?filter%5B%3D%3D%5D%5Bproduct.type.code%5D=select
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Help with Json API - Filtering the product list
Thank you very much, I get it now. and thanks for the wonderful product.


