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.
The category or tag with the text or alias searched is shown in the result of the API call.
In both cases are shown all the results existing in the joomla db. Categories or tags depending on the request.
Joomla 4.2.5
PHP 7.4.30
10.4.25-MariaDB
Apache/2.4.54 (Win64)
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.
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Webservices
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-12-14 14:29:17 |
Closed_By | ⇒ | alikon |
please test #42519