Both are available under open-source (LGPL) licenses and can be used to manually drive around a TrueNAS system using the API, or can be used as reference for your own projects which require direct TrueNAS integration.
As always, API documentation is available in-product, as well as on our Documentation Hub. Lastly you can use the TrueNAS AI-Powered Search to generate working examples of code which talks to the API.
It was written for FreeNAS 11, and AFAIK works with every release of CORE and SCALE. Rewriting it to use midclt would presumably narrow its applicability.
Thanks!
I wish I knew how to do Python coding. I can use the API in a BASH script however I suspect it would be easier to use it in Python (which I don’t know either)
Both of these implementations can be run as stand-alone runtimes as well, so technically you could write a bash wrapper around them. Only big hurdle there is dealing with JSON in bash is a nightmare of jq usage
Yea, I was there a few years back. I did enough bash, jq, awk, and sed combinations until I had enough and had to go learn Golang to get some modern convenience.