Back

How to get the collection activity ??

  • 0
  • Databases
steve jobs
14 May, 2023, 08:00

hot to get the collection activity from admin SDK?? is there any way?? i can see it in console. but to get it as list or do query on them , like, get the last 30 activity on this collection??

TL;DR
The user is asking about how to get the collection activity using the admin SDK. They mention that it can be done using a REST API request with an API key and project ID. The user also shares a specific REST API endpoint that can be used to fetch the logs. They ask if it's possible to query the activity logs like other collections using the `listDocuments` function. Other users in the thread confirm that the feature might not be available yet and suggest contacting support for more information. There is no solution provided in this thread.
safwan
14 May, 2023, 08:47

going through the docs, I can't seem to find any resource that allows us to list the activity logs. It probably isn't a feature yet. Mind if I as what your use-case is?

steve jobs
14 May, 2023, 09:19

Ya.. i thought it was easy just like getting user logs.. but it was missing from docs when i searched πŸ˜‚

steve jobs
14 May, 2023, 09:22

Can i query the activity logs just like other collections ?? Using listDocuments ??

steve jobs
14 May, 2023, 09:32

this one does the job.

steve jobs
14 May, 2023, 09:35

but dart SDK doesnt have it. REST epi end points can fetch it

steve jobs
14 May, 2023, 09:38

but why the SDK miss it?

safwan
14 May, 2023, 10:52

Does this give you the Activity logs?

safwan
14 May, 2023, 10:53

I'm not sure why it isn't included in the SDK. Maybe I'm missing something πŸ˜…

safwan
14 May, 2023, 10:54

Regardless, if it does the job, I would simply make a function to call and process the response from this for now

steve jobs
14 May, 2023, 11:06

Just like any normal REST api call.. with api key (with collection permission) , and project id..

Drake
14 May, 2023, 17:22

Technically, we have 3 types of APIs, client, server, and admin. The admin related APIs aren't included in the server sdk.

steve jobs
14 May, 2023, 17:25

But i can get the collection logs using api key..just like a REST api request.. but i won't report it as bug for sure πŸ™Š

Drake
14 May, 2023, 17:25

Ya NVM about that

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more