Page 1 of 1

rest_ws POST endpoint security tracking

PostPosted: Mon Mar 25, 2024 11:57 am
by LXS
Hi,

i'm using the rest_ws plugin to call a POST endpoint which creates a new record in a table.
On this table i enabled "Tracking (Insert/Update/Delete)" for a user group also called "Tracking".
I also added my webservice user to the "Tracking" group.

But it seems that rest_ws calls are stateless and so there is no user login and no tracking which documents record changings.

Is there a way when using the rest_ws plugin to record the changes via security tracking?

Thanks!
Alex

Re: rest_ws POST endpoint security tracking

PostPosted: Tue Mar 26, 2024 11:16 am
by Ruben79
Hi Alex,

Do you call security.login() in your ws_create method with your webservice user? I think that should make it work.

Re: rest_ws POST endpoint security tracking

PostPosted: Tue Mar 26, 2024 11:50 am
by LXS
Hi Ruben,

thank you very much! It was indeed so simple! I thought there would be an auto-login with the basic auth.

Alex