Here is a connector BR we used to import from workday. You can use this as a starting point/reference and build your BR and use this connector BR in a DataSource. Original code provided by OneStream (courtesy Joakim Kulan)
Imports System
Imports System.Data
Imports System.Data.Common
Imports System.IO
Imports System.Collections.Generic
Imports System.Globalization
Imports System.Linq
Imports Microsoft.VisualBasic
Imports System.Windows.Forms
Imports OneStream.Shared.Common
Imports OneStream.Shared.Wcf
Imports OneStream.Shared.Engine
Imports OneStream.Shared.Database
Imports OneStream.Stage.Engine
Imports OneStream.Stage.Database
Imports OneStream.Finance.Engine
Imports OneStream.Finance.Database
Imports System.Net
Imports System.Web.Script.Serialization
Imports newtonsoft.json
Imports newtonsoft.json.linq
Imports System.Xml
Namespace OneStream.BusinessRule.Connector.FTE_Workday
Public Class MainClass
Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Transformer, ByVal args As ConnectorArgs) As Object
Try
'Get the Field name list or load the data
Select Case args.ActionType
Case Is = ConnectorActionTypes.GetFieldList
'Return Field Name List if using Field List Method to get field list in GetFieldList
'-----------------------------------------------------------
Dim fieldList As List(Of String) = GetFieldList(si, globals, api)
Return fieldList
Case Is = ConnectorActionTypes.GetData
Dim sourceDataREST As DataTable = GetSourceDataREST(si, globals, api)
api.Parser.ProcessDataTable(si, sourceDataREST, False, api.ProcessInfo)
Return Nothing
End Select
Return Nothing
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
'Create the field list items to get field list (Recommended)
'-----------------------------------------------------------
Private Function GetFieldList(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Transformer) As List(Of String)
Try
Dim fields As New List(Of String)
fields.add("Field1")
fields.add("Field2")
..
fields.add("FieldN")
Return fields
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
'Create the data load Statement
Private Function GetSourceDataREST(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Transformer) As DataTable
Try
' Dim wdUser As String = ""
' Dim wdPass As String = ""
' Dim wdCreds As String = encodebase64(wdUser & ":" & wdPass)
' Use already encoded credentials (eg.,In Postman) key
Dim wdCreds As String = "<encodedkey>"
'Call the REST API
Dim wc As New WebClient
wc.Encoding = Encoding.UTF8
wc.Headers("cache-control") = "no-cache"
wc.Headers("ContentType") = "application/json"
wc.Headers("Accept") = "application/json"
wc.Headers("Authorization") = "Basic " & wdCreds
Dim jsonURL As String = "<webapiurl>?Format=json&<paramname>=" & <paramvalue>
Dim json As String = wc.DownloadString(jsonurl)
'Convert result in API to table format
' Dim pulldata As DataTable = jsonConvert.DeserializeObject(Of DataTable)(json)
Dim dataSet As DataSet = jsonConvert.DeserializeObject(Of DataSet)(json)
Dim pullData As DataTable = dataSet.Tables(0)
'Close Web connection
wc.dispose
'Return the dataset
Return pullData
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
End Class
End Namespace