How to communicate programmatically with cardano-node?

Is there any documentation for the API cardano-node exposes over the IPC socket? I am assuming that’s how cardano-cli can query blockchain data and how nodes communicate in general.
Shifting through cardano-node code to figure it out is doable but seems unnecessary. Am I missing something?

The closest I found was this:

But I haven’t come to try if it helps me actually connecting to the socket and doing something over it.