What is the best way to get a non-client file from session relevance

What I wanted is to publish a sqlite database to a site as non-client file, then I can query it using session relevance. In order to refer to the sqlite I need to have a path to its folder. Is there a way to get this folder in session relevance?

Or is there better approach to host and query the sqlite database?

Thank you in advance!

I don’t think you can query a sqlite db in session relevance at all. You could put a sqlite db on every client and have the client query the database into a property result and then access that result through session relevance.

What is your use case?

Content of site files can’t be read by session relevance.
Site files can be retrieved using REST API

1 Like

Thank you so much James and Garret for your replies.

The use case is that I would need to query some info from a sqlite file, and that piece of info can then be used to query Fixlets using session relevance. I am afraid putting it to client doesn’t solve the issue as this need to happen in console.

I guess my original target is not possible, will try querying the file first, and dynamically construct respective session relevance. Will also try the REST API approach by Garret.

Thanks again for your time and advices!

If you want to use the file in the Console then the latest console has a new API to allow use of REST API.
I’ll dig out the details and add to this post when I get them.
… So here’s the Console API, which should be in 9.2.5+

API.Get(uri, options, callback)
API.Post(uri, options, callback)
API.Put(uri, options, callback)
API.Delete(uri, options, callback)

I’m not sure if there’s docs on the wiki but if this is something you need to use PM and I can get more details.

1 Like

I still don’t really understand what this SQLite db will hold and why you need to query it and what type of info it will query?

Is the info in the DB related to each client, or is it more global info?

Do you know what you need to query from the DB ahead of time?