Websocket methods to: rename a dataset? "duplicate" a ds? create an "independant" ds from a snapshot of another ds?

I’m currently writing a kubernetes csi driver in go dedicated to truenas scale (v24.10+)
I exclusively uses the websocket api, and login is done only via an api key
Most of the csi features are implemented and it works quite well
But I do not know how to implements some features uniquely via the WS interfaces and other features would be greatly simplified if some WS services were implemented. Or maybe I miss something.
So currently what I need:

  • there is no “rename a dataset”: method. Currently I take a snapshot, clone the snapshot into a new DS, promote the nes DS, delete the original ds. very cumbersome
  • “duplicate” a ds, ie not "zfs.“clone”, ie have 2 independent datasets with same content but not related afterword: how to do that? zfs.send/zfs.receive are not available. There is nos such “zfs.dataset.clone” or “pool.dataset.clone” or “filesystem.copy”…services. thinking of “replication.run_onetime” job… wack
  • “create an independent ds from a snapshot from another ds”. similar to previous point

The process has to be done on the server side, ie not mount in nfs the 2 dataset and “copy” the content of the ds/snapshot from one to another as it will be slowed down by the network

I’m using truenas scale 24.10 for now. will 25.04 add methods to the ws api?

Thanks for your help

Currently we don’t expose a public API to rename datasets. People developing tools to interact with our API should not call into private endpoints (including the ZFS namespace). We have plans to lock out access to them. There is a ticket to add rename capabilities to 25.10.

ok.Thanks.
Is there a public api to “duplicate” a dataset as explain in my post. maybe encapsulating “zfs.send | zfs.receive” functionanilty? or an enpoint to send arbitrary linux/zfs commands?
What is the correct way to perform a “duplicate” dataset from a client?
(your answer suggest there is are “private endpoints” really?)

Renames are generally expected by most consumers to be atomic. send/recv can’t meet an atomicity guarantee. I think doing something that way (without atomicity) would be maybe OK for personal homelab use but would not be something to distribute at large or use in business case.

I also need a way to duplicate datasets (ie create an independent dataset from another one without any link aferward) or create one from a snapshot without any link aferward.

So do you have a suggestion on how to to do that from a client, a sequence of ws calls?
What is the correct way to perform a “duplicate” dataset from a client?