I don't know anything about "programatically linking two servers" for IDS.
You just need 2 IDS databases (you can have them on the same server or 2 different servers; same IDS instance or 2 instances), you need to configure instance(s) to receive remote connection (if you have 2 servers), and you can have distributed queries between instances. This isn't any high-tech procedure - it is simple IDS configuring.