-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.0] Add author to output and filter options to com_content API #28382
[4.0] Add author to output and filter options to com_content API #28382
Conversation
@alikon this should port over some of the work you were doing on filters |
a couple of things :
{
"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 🤣 |
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
In my opinion no - because the URL is valid - it's just no data matches the filter criteria. |
thanks for reply |
I have tested this item ✅ successfully on 759417d This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28382. |
tip for those who want to search on content (fulltext) suppose you would search for word mundi the call is: |
@alikon can you do the language PR as it's own thing and let's discuss there whether to use PK or the language code for filtering |
yes for sure |
see #28406 |
Summary of Changes
articles
type instead ofcategories
typeTesting Instructions
JROOT_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
Documentation Changes Required
Yes: