less than 1 minute read

How to do it?

import { createClient } from "santricity-client";

const client = await createClient({
  baseUrl: "https://array01.example.com:8443/devmgr/v2",
  username: "admin",
  password: "secret",
  systemId: "600A098000F63714000000005E79C17C",
  releaseVersion: "12.1",
});

try {
  const pools = await client.call("pools.list");
  const volume = await client.call("volumes.get", ["02000000..."]);
  const custom = await client.request("GET", "/something-else");
  const mapped = await client.runPython(`
client.reports.mappings()
`);
  console.log({ pools, volume, custom, mapped });
} finally {
  await client.close();
}

Conclusion

Which one is correct or "better", that depends.

If you just need to create or delete a volume, DIY is fine. YMMV.

I'll use my library because it does stuff. I could use it to build a fancy Proxmox plugin and work around the NVMe/RoCE sabotage in Proxmox 9.3.