create datasource using web service

workforce team shared this question 49 days ago
Answered

As a part of our provisioning procedure we need:

- create data source for a client organization

- set up data source substitution for data source in default client org


How can this steps be implemented using web service calls? The current list of webservices can only update existing datasource.

Comments (3)

photo
2

Hi there,

Our Wiki has some information on creating and managing data sources: https://wiki.yellowfinbi.com/display/yfcurrent/Data+Source+Management+Services

Specifically the SAVEDATASOURCE service can both create and update data sources. They can only be created for the default organisation but you can then follow it up with a METADATASQLQUERY to attach it to the client org.

For data source substitution, there is the service LINKDATASOURCE, which I believe is what you are looking for. It can link a default org data source with client org sources, such that a view can substitute in different data sources depending on the client org.

More information and code examples can be found on the above linked page.

Let me know if that answers your question.

Kind regards,

Chris

photo
2

It is possible to create a datasource in the client org using the SOAP API. It will work if you use a client org user in your request. For example:

<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<orgRef>yourClientOrgRef</orgRef>
<function>SAVEDATASOURCE</function>...
You should then be able to link the primary org source with this one using LINKDATASOURCE. Make sure you're logged in as a primary org user in this case. 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:web="http://webservices.web.mi.hof.com/">;
   <soapenv:Header/>
   <soapenv:Body>
    <web:remoteAdministrationCall>
        <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <function>LINKDATASOURCE</function>
            <sourceId>100147</sourceId> <!-- Primary Org Source -->
            <sourceClientLink>
                <sourceId>100155</sourceId> <!-- Client Source -->
            </sourceClientLink>
        </arg0>
    </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>
Cheers, 

Deepak

photo
1

create data source for a client organization works usually but fails when DB password has "&" with below error.


Message - org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 2662; The entity name must immediately follow the '&' in the entity reference.

How can we resolve this?

photo
1

it working after escaping it

photo
photo
1

Hi,


Just wanted to let you know I'll be closing this request due to inactivity. However, if you ever wanted to re-visit this or have anything else I can help you with, please let me know.


Regards,

Chris