Page 1 of 1

Using SDK to query ETP server

Posted: Mon Jan 09, 2023 9:22 am
by Taras
Is it possible to query ETP server programmatically (using SDK).

I do not see any API for that. Am I missing something?

Re: Using SDK to query ETP server

Posted: Tue Jan 10, 2023 2:52 am
by void
There's more information on the EVERYTHING FTP extension here:

https://www.voidtools.com/forum/viewtopic.php?t=1790

Re: Using SDK to query ETP server

Posted: Tue Jan 10, 2023 11:51 am
by Taras
Thank you void,

Though I am not sure the documentation you provided is relevant for the task I am facing. I have no problems setting up ETP server on the running instance of Everyting.
I am specifically looking for a solution for running a query on the EFT server by using a custom client app developed with the SDK you provided.

I have an app that does execute the query and receives the result from the local file system. Great. But I do not see anything in the API that would allow me to indicate that the query is not for the local file system but a remote one accessible via ETP.

Re: Using SDK to query ETP server

Posted: Thu Jan 12, 2023 7:16 am
by void
I don't have an SDK to directly access an ETP server.

The above link provides information about the Everything FTP extension.
You would need to connect to the ETP server manually and send these Everything commands.

Maybe I have misunderstood, are you trying to use the SDK to talk with Everything that is currently connected to an ETP server?
Unfortunately, that is not support yet.

The SDK will only talk with the local database.


Are you able to run something on the PC that is hosting the ETP server?

Re: Using SDK to query ETP server

Posted: Thu Jan 12, 2023 1:14 pm
by Taras
> Maybe I have misunderstood, are you trying to use the SDK to talk with Everything that is currently connected to an ETP server?
Yes, I am.

> Unfortunately, that is not support yet.
Not a problem. I will then try an alternative approach.

Right now, I have a working prototype of a simple WEB API (REST) server that runs alongside the SE hosting ETP server. And the REST server exposes only one enpoint `/query`, which receives the GET request with the query text and query parameters. The request triggers the communication with the local instance of SE via SDK and returns the result as JSON. That local instance in fact does not even need ETP running as remote custom clients can use REST.

In fact, REST seems to be a much more attractive alternative to the ETP channel. Just a thought.

But what I was looking for, before started investing in REST, and extra API for selecting the query target:

Code: Select all

Everything_ConnectToETP(url, port, user, password, connectionType);
Everything_SetSearchW(query);
. . .
Anyway, thank you. I will proceed from here with REST channel.