Is there any API available to get all relationship files of all versions?

For example one documents has 3 versions so I need to get the relationships for all 3 versions separately.

SolidworksApi macros