? No Code Attached Yet
avatar wilsonge
wilsonge
19 Jan 2020

Placeholder issue for working on the API including:

  1. Linking of resources (e.g. article to language, tags, category etc)
  2. Reviewing that properties we want to be returned are
  3. Public API flag doesn't work
avatar wilsonge wilsonge - open - 19 Jan 2020
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jan 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 Jan 2020
avatar wilsonge wilsonge - change - 19 Jan 2020
Labels Added: ?
avatar wilsonge wilsonge - labeled - 19 Jan 2020
avatar wilsonge wilsonge - change - 21 Jan 2020
The description was changed
avatar wilsonge wilsonge - edited - 21 Jan 2020
avatar Razzo1987
Razzo1987 - comment - 26 Jan 2020

Hi @wilsonge ,
can I add another 2 issues?

  1. Title length in content/article
  2. state in content/article

If I try to create an article with this data:

"title":"La Nigeria prende in consegna l'ex procuratore generale Adoke per un affare di petrolio da 1,3 miliardi di dollari",
"catid":8,
"state":1,
"created":"2020-01-24 08:23:05",
"language":"*",
"metadesc":"ABUJA (Reuters) - Il cane da guardia del crimine finanziario della Nigeria ha accusato l'ex procuratore generale Mohammed Adoke ...",
"metakey":"",
"articletext":"<p>ABUJA (Reuters) - Il cane da guardia del crimine finanziario della Nigeria ha accusato l'ex procuratore generale Mohammed Adoke di aver presumibilmente ricevuto tangenti per facilitare un accordo petrolifero di $ 1,3 miliardi, ha detto l'agenzia in una nota gioved\u00ec.<\/p><div class=\"alert alert-info\" role=\"alert\">Articolo tradotto da <a href=\"http:\/\/feeds.reuters.com\/~r\/reuters\/AFRICATopNews\/~3\/mXLflbrOo7Q\/idAFKBN1ZN0HU-OZATP\" target=\"_blank\">Top Africa News<\/a>.<\/div>"
}

And I recieve this error:

{
   "errors":[
      {
         "title":"Save failed with the following error: Data too long for column 'title' at row 1"
      }
   ]
}

if I use a shorter title, the article is still inserted as unpublished

avatar Quy
Quy - comment - 26 Jan 2020

Add #26564 here or its own issue.

avatar Razzo1987
Razzo1987 - comment - 27 Jan 2020

Add #26564 here or its own issue.

I create a new one: #27673

avatar alikon
alikon - comment - 18 Jul 2020

for #30130, #30135 test #30134

avatar alikon
alikon - comment - 20 Jul 2020

for the more general question raised #30145

In theory all fields available in the backend should be visible via the API too assuming we are gearing towards making with 100% API driven.

would like to listen @wilsonge before to propose a PR

avatar alikon
alikon - comment - 24 Oct 2020

@wilsonge can you elaborate a bit more on

  1. Public API flag doesn't work

from January some properties has been revisited

  1. Reviewing that properties we want to be returned are
avatar wilsonge
wilsonge - comment - 26 Nov 2020

In theory all fields available in the backend should be visible via the API too assuming we are gearing towards making with 100% API driven.

would like to listen @wilsonge before to propose a PR

Basically we want to expose everything in the API - there's potentially some fields we may choose to not because they are totally internal to the Joomla UI but I think they will be few and far between. There's going to be a small number of cases where I'm also delaying some sensitive fields to give the API time to bed in and get tested (mainly stuff in com_users that's security related) - hence I merged some of the com_users PRs for 4.1

  1. Public API flag doesn't work

There was a property that a route in a webservice that can return with the boolean public that (by default false) can be set to true to expose a webservice to the public (unlikely to ever be used in core - but could be enabled on websites for custom webservices).

Relevent code: https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Application/ApiApplication.php#L297-L303

This is mainly designed for read endpoints - I don't have any real expectations that this would work for post/put etc endpoints. However if you specify this things still kinda fail to be publically accessible. The login code doesn't run but other things later on in the process fail because there's no valid user objects in JUser or something (can't remember the specifics now)

avatar alikon
alikon - comment - 4 Dec 2020

ok,
so for 3 Public API flag doesn't work see #31579

avatar wilsonge wilsonge - change - 13 Mar 2021
The description was changed
avatar wilsonge wilsonge - edited - 13 Mar 2021
avatar wilsonge wilsonge - change - 14 Mar 2021
The description was changed
avatar wilsonge wilsonge - edited - 14 Mar 2021
avatar rdeutz rdeutz - change - 6 Apr 2021
Labels Removed: ?
avatar rdeutz rdeutz - unlabeled - 6 Apr 2021
avatar Hackwar Hackwar - change - 21 Feb 2023
Labels Added: ? No Code Attached Yet
Removed: ?
avatar Hackwar Hackwar - labeled - 21 Feb 2023

Add a Comment

Login with GitHub to post a comment