Question
· 6 hr ago

InterSystems health connect interface to transfer files to SharePoint

hi everyone

we are migrating a legacy script that uploads the files to a SharePoint site through webdav to Health Connect engine.

I wonder if anyone has ever done that, if yes, what did you do to achieve this?

 

thanks in advance,

 

Frank

Product version: IRIS 2024.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2024.1.4 (Build 516_1U) Sat May 31 2025 12:37:46 EDT
Discussion (1)2
Log in or sign up to continue

To transfer files to SharePoint via InterSystems Health Connect, you can use SharePoint's REST API through InterSystems HTTP operations. Here's a potential approach:

  1. HTTP Operations to Interact with SharePoint:

    • You can leverage HTTP requests to interact with SharePoint APIs directly. Examples include operations to upload, delete, or retrieve files using API endpoints such as GetFolderByServerRelativeUrl or Files/add [1].
  2. OAuth2 Authorization:

    • SharePoint's API requires OAuth2 authorization. You can use InterSystems' built-in mechanisms to handle OAuth2. This involves using methods like GetAccessTokenClient or AddAccessToken to include the access token in HTTP headers for authenticated API calls [1].
  3. Data Handling:

    • For file uploads and downloads, InterSystems stream containers such as Ens.StreamContainer can handle binary data streams. For example, creating a binary stream for file uploads and setting it as the EntityBody in your HTTP request [1].
  4. Additional Documentation and Examples:

    • InterSystems provides tools to simplify HTTP requests and responses, including reusable templates for request formatting. This approach can generalize integration patterns not just for SharePoint but for other APIs [1].

This method would align with migrating scripts and ensuring interoperability via Health Connect. If you'd like further examples or assistance, you may want to consult InterSystems Developer Community. [1]

Sources: