Using curl to initiate recording

I’m trying to initiate a recording from the cli

Of course google AI gives a BS solution that doesn’t work

Here’s what AI suggests for me to record channel 17.1

curl http://:5004/auto/v17.1 > output.ts

All I get is a zero byte file, more than likely due to missing auth tokens etc

Does anyone have a working curl statement I can use as a model to initiate a TV recording with?

This looks similar to what you would do to record directly from a HDHomerun device.
curl http://<ip address of hdhomerun>:5004/auto/v5031 > recordedfile.ts
(The last path /v5031 should be replaced by the channel number on your device. There are no tokens etc. necessary.)

But all that has nothing to do with Plex.
As for your original question: Sorry, I don’t know the answer.
Maybe you can find it in the API documentation: https://developer.plex.tv/

SiliconDust documents their HTTP API here:

If you, for example, have an HDHomeRun tuner at IP address 192,168.1.100 and you want to record virtual channel 17.1 for 30 seconds, you could use something like:
curl -o showname.ts http://192.168.1.100:5004/auto/v17.1&duration=30

Good one on the duration! I guess for now I’ll just use a cron script to record direct from the HDHomerun.

I wish Plex Devs would take a close look at how TiVo recordings are managed as Plex leaves a lot to be desired as a PVR.

I personally use NextPVR as a backup for Plex. You’ll have to provide your own guide data, but it’s very flexible with regard to scheduling.