? ? Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
17 Nov 2019

Summary of Changes

listen event onAfterDispatch to keep track of API requests on actionlogs

Testing Instructions

make some requests GET for example:
/api/index.php/v1/plugins
/api/index.php/v1/users
/api/index.php/v1/config/application
/api/index.php/v1/content/article
....
etc...

test other verbs as welll

Expected result

API requests logged
something like
Screenshot from 2019-11-17 11-12-02

Actual result

N/A

Documentation Changes Required

maybe

avatar alikon alikon - open - 17 Nov 2019
avatar alikon alikon - change - 17 Nov 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Nov 2019
Category Administration Language & Strings Libraries Front End Plugins
avatar mbabker
mbabker - comment - 17 Nov 2019

Does this REALLY need a new event? Couldn’t onAfterDispatch work just as well here? You’d just need to check context if using that event.

avatar alikon alikon - change - 17 Nov 2019
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 17 Nov 2019
Category Administration Language & Strings Libraries Front End Plugins Administration Language & Strings Front End Plugins
avatar alikon
alikon - comment - 17 Nov 2019

yes again ?
there is no need for a new event onAfterDispatch does already the job

avatar alikon alikon - change - 17 Nov 2019
The description was changed
avatar alikon alikon - edited - 17 Nov 2019
avatar wilsonge
wilsonge - comment - 18 Nov 2019

Looks good to me. Just needs some tests

avatar Quy
Quy - comment - 3 Dec 2019

Please fix conflicts.

avatar alikon alikon - change - 3 Dec 2019
Labels Added: Conflicting Files
avatar alikon
alikon - comment - 3 Dec 2019

conflict solved

avatar Quy
Quy - comment - 3 Dec 2019

User admin performed a GET on index.php/v1/modules/site?language=%2A&state=0

* is displayed as %2A

avatar alikon alikon - change - 3 Dec 2019
Labels Removed: Conflicting Files
avatar alikon alikon - change - 12 Feb 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-02-12 19:35:43
Closed_By alikon
Labels Added: ?
avatar alikon alikon - close - 12 Feb 2020
avatar alikon alikon - change - 20 Feb 2020
Status Closed New
Closed_Date 2020-02-12 19:35:43
Closed_By alikon
avatar alikon alikon - change - 20 Feb 2020
Status New Pending
avatar alikon alikon - reopen - 20 Feb 2020
avatar chmst
chmst - comment - 20 Mar 2020

Tested with different words, for example

api-test-actionlogs

avatar chmst
chmst - comment - 20 Mar 2020

I have tested this item successfully on afb8f8f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27094.

avatar chmst chmst - test_item - 20 Mar 2020 - Tested successfully
avatar wilsonge
wilsonge - comment - 20 Mar 2020

Having thought about this I think we probably want to have an additional flag for this API setting. Because in the case you have mobile apps using the API actively you're going to end up having too many entries in action logs. But you might well still want other actions logged in the component.

avatar N6REJ
N6REJ - comment - 20 Mar 2020

Tests ran:
image

Results:
image

I have tested this item successfully on afb8f8f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27094.

avatar N6REJ N6REJ - test_item - 20 Mar 2020 - Tested successfully
avatar alikon alikon - change - 21 Mar 2020
Labels Removed: ?
avatar alikon
alikon - comment - 21 Mar 2020

ok i've fine grained the api logging
Screenshot from 2020-03-21 09-35-45

now you can disable the api logging
you can enable only some verbs to be logged
and of course only on some "Events"

avatar alikon
alikon - comment - 21 Mar 2020

@chmst, @N6REJ another round of tests please

avatar Razzo1987
Razzo1987 - comment - 24 Mar 2020

I have tested this item successfully on 4a38077

GET: ok
POST: ok
DELETE: ok
PUT: not tested (if someone have an example I try it)
PATCH: non listed in "Verds to log" ( I test this example: https://docs.joomla.org/J4.x:Joomla_Core_APIs#Update_Article)

J API


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27094.

avatar Razzo1987 Razzo1987 - test_item - 24 Mar 2020 - Tested successfully
avatar wilsonge wilsonge - change - 24 Mar 2020
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-03-24 11:38:27
Closed_By wilsonge
avatar wilsonge wilsonge - close - 24 Mar 2020
avatar wilsonge wilsonge - merge - 24 Mar 2020
avatar wilsonge
wilsonge - comment - 24 Mar 2020

Thanks!

avatar alikon
alikon - comment - 24 Mar 2020

thanks folks + thanks to covid19 for lockdown
?

Add a Comment

Login with GitHub to post a comment