Page 1 of 1

Filebot-node arbitrary api calls

Posted: 11 Feb 2018, 21:00
by devster
Is it possible to use filebot-node to run FileBot with arbitrary options and configurations?
If not, are the necessary adjustments trivial or would it mean rewriting it completely?

The objective would be to use it in a dockerized environment, running for example, NZBGet and Transmission in separate containers and executing api calls to FileBot for post-processing.

Re: Filebot-node arbitrary api calls

Posted: 12 Feb 2018, 08:03
by rednoah
Try the FileBot Node docker and see how it works. If you inspect the web requests from the web UI then you'll see exactly what is possible and what isn't. You can't call arbitrary FileBot commands thought, just the amc script.

I'd recommend having your upstream docker SSH into you downstream FileBot docker and call the commands directly via the shell.

FileBot Node is effectively nothing but a wrapper for certain FileBot CLI commands anyway at this point.

Re: Filebot-node arbitrary api calls

Posted: 12 Feb 2018, 10:28
by devster
The AMC script is the main objective.

The main reason I prefer web requests is that it's much easier on docker.
Containers on the same network have names, for example if both NZBGet and Transmission are on the same docker network I can call the respective APIs from one container to the other through http://nzbget:6789/jsonrpc or http://transmission:9091/transmission/rpc, and with service discovery both the endpoints and the port/names can be announced via environment variables or other methods.

I'll try and test a few options see what works best.

Re: Filebot-node arbitrary api calls

Posted: 27 Sep 2018, 15:26
by GhostOfSparta
devster wrote: 12 Feb 2018, 10:28 The AMC script is the main objective.

The main reason I prefer web requests is that it's much easier on docker.
Containers on the same network have names, for example if both NZBGet and Transmission are on the same docker network I can call the respective APIs from one container to the other through http://nzbget:6789/jsonrpc or http://transmission:9091/transmission/rpc, and with service discovery both the endpoints and the port/names can be announced via environment variables or other methods.

I'll try and test a few options see what works best.
Did you ever get resolution on this? I'd love to be able to call a webservice for post-processing instead of mushing the filebot cli into my ruttorrent container.

Re: Filebot-node arbitrary api calls

Posted: 28 Sep 2018, 03:22
by rednoah
1.
I'd say the "correct" way of calling commands on a different machine / docker containers, would be to just use SSH to login and call the command.


2.
FileBot node might not be ideal, but if you use FileBot Node, and look at the HTTP requests via the Inspector, then you can probably collect HTTP GET requests that you could replay via the curl command.

Re: Filebot-node arbitrary api calls

Posted: 01 Oct 2018, 08:59
by devster
One potential solution I found, but it's hackish at best, is using something like https://github.com/adnanh/webhook and coding in selected FileBot commands.
I'm sure there's plenty to worry about from a safety perspective.