how to get a document id by api

HI team

      I want to get a id of  top assembly by API,how to do it?

SolidworksApi/macros