Using SDK to query ETP server

Plug-in and third party software discussion.
Post Reply
Taras
Posts: 3
Joined: Mon Jan 09, 2023 7:01 am

Using SDK to query ETP server

Post by Taras »

Is it possible to query ETP server programmatically (using SDK).

I do not see any API for that. Am I missing something?
void
Developer
Posts: 16698
Joined: Fri Oct 16, 2009 11:31 pm

Re: Using SDK to query ETP server

Post by void »

There's more information on the EVERYTHING FTP extension here:

https://www.voidtools.com/forum/viewtopic.php?t=1790
Taras
Posts: 3
Joined: Mon Jan 09, 2023 7:01 am

Re: Using SDK to query ETP server

Post 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.
void
Developer
Posts: 16698
Joined: Fri Oct 16, 2009 11:31 pm

Re: Using SDK to query ETP server

Post 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?
Taras
Posts: 3
Joined: Mon Jan 09, 2023 7:01 am

Re: Using SDK to query ETP server

Post 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.
Post Reply