You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem using the Joomla 4 API.
I'm trying to retrieve the data of a single category or a single tag by the alias because I don't know the id.
The api urls I'm using I have tried both cases filter search that searches title, alias and content text fields. The API url Calls:
{{base_url}}/{{base_path}}/content/categories?filter[search]=blog
And I have filtered by the specific field the alias:
{{base_url}}/{{base_path}}/content/categories?filter[alas]=blog
When I see the results that api returns I can see all the categories I have in joomla but not the one I'm searching.
The same thing happens to me with the tags
{{base_url}}/{{base_path}}/tags?filter[search]=provatag3
{{base_url}}/{{base_path}}/tags?filter[alias]=provatag3
Both queries return all the tags I have in joomla.
I know there's no documentation in the joomla api documentation about filtering but I think it should work. At least searching by alias the articles seems to work.
Expected result
The category or tag with the text or alias searched is shown in the result of the API call.
Actual result
In both cases are shown all the results existing in the joomla db. Categories or tags depending on the request.
Inside the joomla api\components\com_content\src\Controller\ArticlesController.php exist the method displaylist that is filtering the search for articles, so for articles we can get the articles searched by text or alias. I think the same should be replicated to the TagsController and to the CategoriesController to have the same feature in the api with not much effort.
The text was updated successfully, but these errors were encountered:
Steps to reproduce the issue
I have a problem using the Joomla 4 API.
I'm trying to retrieve the data of a single category or a single tag by the alias because I don't know the id.
The api urls I'm using I have tried both cases filter search that searches title, alias and content text fields. The API url Calls:
{{base_url}}/{{base_path}}/content/categories?filter[search]=blog
And I have filtered by the specific field the alias:
{{base_url}}/{{base_path}}/content/categories?filter[alas]=blog
When I see the results that api returns I can see all the categories I have in joomla but not the one I'm searching.
The same thing happens to me with the tags
{{base_url}}/{{base_path}}/tags?filter[search]=provatag3
{{base_url}}/{{base_path}}/tags?filter[alias]=provatag3
Both queries return all the tags I have in joomla.
I know there's no documentation in the joomla api documentation about filtering but I think it should work. At least searching by alias the articles seems to work.
Expected result
The category or tag with the text or alias searched is shown in the result of the API call.
Actual result
In both cases are shown all the results existing in the joomla db. Categories or tags depending on the request.
System information (as much as possible)
Joomla 4.2.5
PHP 7.4.30
10.4.25-MariaDB
Apache/2.4.54 (Win64)
Additional comments
Inside the joomla api\components\com_content\src\Controller\ArticlesController.php exist the method displaylist that is filtering the search for articles, so for articles we can get the articles searched by text or alias. I think the same should be replicated to the TagsController and to the CategoriesController to have the same feature in the api with not much effort.
The text was updated successfully, but these errors were encountered: