User tests: Successful: Unsuccessful:
articles
type instead of categories
typeJROOT_URL/api/index.php/v1/content/article?filter[search]=tag
which will search for the string 'tag'
JROOT_URL/api/index.php/v1/content/article?filter[state]=0
will search for unpublished articles
Yes:
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Title |
|
a couple of things :
should not this show a conflict file cause of #28384 touching api/components/com_content/src/View/Articles/JsonapiView.php
calling JROOT_URL/api/index.php/v1/content/article?filter[state]=0 without unpublished give me this response
{
"links": {
"self": "http:\/\/localhost\/jbs4\/api\/index.php\/v1\/content\/article?filter%5Bstate%5D=0",
"first": "http:\/\/localhost\/jbs4\/api\/index.php\/v1\/content\/article?filter[state]=0&page[offset]=0&page[limit]=20",
"next": "http:\/\/localhost\/jbs4\/api\/index.php\/v1\/content\/article?filter[state]=0&page[offset]=-20&page[limit]=20",
"previous": "http:\/\/localhost\/jbs4\/api\/index.php\/v1\/content\/article?filter[state]=0&page[offset]=0&page[limit]=20",
"last": "http:\/\/localhost\/jbs4\/api\/index.php\/v1\/content\/article?filter[state]=0&page[offset]=-20&page[limit]=20"
},
"data": [],
"meta": {
"total-pages": 0
}
}
should not it be something like this ?
{
"errors": [
{
"title": "Resource not found",
"code": 404
}
]
}
a funny thing is that we have relations on the api response and not in the database
should not this show a conflict file cause of #28384 touching api/components/com_content/src/View/Articles/JsonapiView.php
No because it's different lines in the file - if i'd modified the same lines of code as you it would cause a conflicts
calling JROOT_URL/api/index.php/v1/content/article?filter[state]=0 without unpublished give me this response
In my opinion no - because the URL is valid - it's just no data matches the filter criteria.
thanks for reply
it works well so let's move on
I have tested this item
tip for those who want to search on content (fulltext) suppose you would search for word mundi
the call is:
JROOT_URL/api/index.php/v1/content/article?filter[search]=CONTENT:mundi
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-03-20 11:12:33 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
yes for sure
@alikon this should port over some of the work you were doing on filters