How can I get document document primary archive server hostname?

For example, I have three archive server(A,B,C). I create one document and check in at archive server A, it will replicate to B,C later.

How can I know the primary archive server of this document's version 1 is A but not B,C by program? I try to query this information from SQL while I can only get whether version 1 already replicated to A/B/C or not. Pls advise.

SolidworksApi macros