How to create a data source in TIBCO Data Virtualization using an API?

How to create a data source in TIBCO Data Virtualization using an API?

book

Article ID: KB0071765

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All supported versions

Description

  • TIBCO Data Virtualization has an inbuilt API - 'createDatasource' that can be used to create a data source without following the normal steps.
  • The API 'createDatasource' could be found under /services/webservices/system/admin/resource/operations

Environment

All supported versions

Resolution

Below is one such example with some dummy data.

1. Navigate to /services/webservices/system/admin/resource/operations/createDatasource in TDV Studio
2. Right-click and open create Datasource.
3. Then execute create Data source (Top left corner of the open pane)
4. Tweak the XML a bit as per your need. You may use the below and make the required changes.
<resource:createDataSource xmlns:resource="http://www.compositesw.com/services/system/admin/resource" xmlns:common="http://www.compositesw.com/services/system/util/common">
  <resource:path>/shared/Data source</resource:path>
  <resource:name>ds_testing</resource:name>
  <resource:detail>NONE</resource:detail>
  <resource:dataSourceType>Siebel</resource:dataSourceType>
  <resource:annotation>Testing this with Siebel</resource:annotation>
  <resource:attributes>
  
    <common:attribute>
      <common:name>server</common:name>
      <common:type>STRING</common:type>
      <common:value>xxx.xxx.xxx.xxx</common:value>
    </common:attribute>
    
    <common:attribute>
      <common:name>username</common:name>
      <common:type>STRING</common:type>
      <common:value>Test</common:value>
    </common:attribute>
    
    <common:attribute>
      <common:name>password</common:name>
      <common:type>PASSWORD_STRING</common:type>
      <common:value>password</common:value>
    </common:attribute>
    
  </resource:attributes>
</resource:createDataSource>

5. Execute the API

After following the above steps the data source will be created under the mentioned path /shared/Data Source/ds_testing

Issue/Introduction

This article explains how to make use of an inbuilt API to create a data source in TIBCO Data Virtualization.