Rsynctask.update via API2.0(midclt)

tfinke

Cadet
Joined
Mar 2, 2021
Messages
1
Dear Forum Members

I am running FreeNAS-11.3-U3.2. There I got a bunch of rsync tasks (about 40). I had created them using API 1.0 and now have to adjust the local path and want to do this using the API 2.0 (because 1.0 is considered deprecated). It is simple to get a list of these tasks by midclt call rsynctask.query. There I find the Ids. Now I tried to modify the path by
midclt call rsynctask.update '{"id": 42, "path": "/mnt/new/sync/jobx"}' midclt call rsynctask.update '{"id": 42, "params": [{"path": "/mnt/new/sync/jobx"}]}' midclt call rsynctask.update '{"id": 42, "properties": [{"path": "/mnt/new/sync/jobx"}]}'
All gave the same error message: TypeError: update() missing 1 required positional argument: 'data'.

My questions:
- what does the error message try to tell me - what is meant by 'data'?
- how to read and understand the API doc on http://mynas/api/docs (looking at the "Websocket" section)?
- how to update my rsync tasks?
- are there examples on the usage of midclt - especially for more complicated tasks?

I think the API is an enormously useful tool and I would appretiate any hints very much.

Regards

Torsten
 
Top