Uipath API convert

I am working on a web automation.
I have to download a file by clicking on the link.

  1. I am using get attribute to get the “href” .
  2. Since it is javascript the “href” is coming as "javascript:openDocument(“123457”,“DMS”).
  3. Is there a way to convert this href code to api , so that I can use the api to download the file without relying on UI automation.

@Ritaman_Baral

Ideally it is not possible as the actual calls are wrapped inside that script

Cheers