Like what you see? Have a play with our trial version.

Error rendering macro 'rw-search'

null

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Web service calls related to exporting content involve an object called ContentResource. (Refer to the object definitions for more details on this object.)  In order to import content using a web service, you would need a YFX or XML file. This is retrieved by calling the EXPORTCONTENT function, or using Yellowfin's export functionality. Note, however, that a file generated via this functionality will contain more content types than those currently supported by the web service API.

 

Main Export Functions

 

Expand
titleGETCONTENT

This function returns all Yellowfin content that can be exported or imported.

 

Request Parameters

The following parameters should be passed with this request:

Request Element

Data Type

Description

LoginId

String

An admin account to connect to Yellowfin web services. This can be the user ID or the email address, depending on the Logon ID method.

This account must have the “web services” role enabled, and must belong to the default (i.e. primary) org.

Password

String

Password of the above account.

OrgId

Integer

Default (i.e. primary) organization ID within Yellowfin. Always set this to 1.

Function

String

Web service function. Set this to "GETCONTENT".

OrgRefStringThis optional parameter can be used to specify a client org. ID

  

Request Example

Below is a SOAP XML example for this request:

Code Block
languagexml
<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>GETCONTENT</function>           
         </arg0>
      </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Parameters

The returned response will contain these parameters:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE
ContentResourcesContentResource[]Object array containing details of Yellowfin's content that can be exported.

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <contentResources>
               <resourceCode>AUDITREPORTS</resourceCode>
               <resourceDescription>Audit Reports</resourceDescription>
               <resourceId>56339</resourceId>
               <resourceName>Audit Reports</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>RPTCATEGORY</resourceType>
               <resourceUUID>a6bdc6b5-a832-42a2-98c7-18273900d0aa</resourceUUID>
            </contentResources>
            <contentResources>
               <resourceCode>ADMINREPORTS</resourceCode>
               <resourceDescription>Admin Reports</resourceDescription>
               <resourceId>56340</resourceId>
               <resourceName>Admin Reports</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>RPTSUBCATEGORY</resourceType>
               <resourceUUID>f7fb32b7-1573-4899-916f-c34afb9a865d</resourceUUID>
            </contentResources>
            <contentResources>
               <resourceCode>CONTENTUSAGE</resourceCode>
               <resourceDescription>Content Usage</resourceDescription>
               <resourceId>56341</resourceId>
               <resourceName>Content Usage</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>RPTSUBCATEGORY</resourceType>
               <resourceUUID>6bae5230-c1f9-4491-8a8b-f14b1ae660d7</resourceUUID>
            </contentResources>
            <contentResources>
               <resourceCode>USERACCESS</resourceCode>
               <resourceDescription>User Access</resourceDescription>
               <resourceId>56342</resourceId>
               <resourceName>User Access</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>RPTSUBCATEGORY</resourceType>
               <resourceUUID>0c7ddde4-fa03-4e88-b37b-7b5e4aad5e1d</resourceUUID>
            </contentResources>
            <contentResources>
               <resourceCode>TUTORIAL</resourceCode>
               <resourceDescription>Tutorial</resourceDescription>
               <resourceId>60706</resourceId>
               <resourceName>Tutorial</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>RPTCATEGORY</resourceType>
               <resourceUUID>a23c2ec6-a2fa-45c7-b5da-dcf3f02e6633</resourceUUID>
            </contentResources>
            <contentResources>
               <resourceCode>ATHLETES</resourceCode>
               <resourceDescription>Athletes</resourceDescription>
               <resourceId>60707</resourceId>
               <resourceName>Athletes</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>RPTSUBCATEGORY</resourceType>
               <resourceUUID>72e4b4bd-a482-4a01-a031-c6ab76dbb3a5</resourceUUID>
            </contentResources>
            <contentResources>
               <resourceCode>CAMP</resourceCode>
               <resourceDescription>Camp</resourceDescription>
               <resourceId>60708</resourceId>
               <resourceName>Camp</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>RPTSUBCATEGORY</resourceType>
               <resourceUUID>465411e5-594b-478e-af64-c0f59fc4546f</resourceUUID>
            </contentResources>
            <contentResources>
               <resourceCode>KPIS</resourceCode>
               <resourceDescription>KPIs</resourceDescription>
               <resourceId>60709</resourceId>
               <resourceName>KPIs</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>RPTSUBCATEGORY</resourceType>
               <resourceUUID>d514c643-dc01-4781-8905-d34e761ccd19</resourceUUID>
            </contentResources>
            <contentResources>
               <resourceCode>MARKETINGBOOKING</resourceCode>
               <resourceDescription>Marketing &amp; Booking</resourceDescription>
               <resourceId>60710</resourceId>
               <resourceName>Marketing &amp; Booking</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>RPTSUBCATEGORY</resourceType>
               <resourceUUID>dbe6d0a3-c088-4d71-b65a-f383aaa54be9</resourceUUID>
            </contentResources>
            <contentResources>
               <resourceCode>TRAINING</resourceCode>
               <resourceDescription>Training</resourceDescription>
               <resourceId>60711</resourceId>
               <resourceName>Training</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>RPTSUBCATEGORY</resourceType>
               <resourceUUID>c503ea57-cc69-43a9-98bc-a90ebbe1c864</resourceUUID>
            </contentResources>
            <contentResources>
               <resourceDescription/>
               <resourceId>70101</resourceId>
               <resourceName>Oracle database</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>DATASOURCE</resourceType>
            </contentResources>
            <contentResources>
               <resourceDescription/>
               <resourceId>70109</resourceId>
               <resourceName>Oracle</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>DATASOURCE</resourceType>
            </contentResources>
            <contentResources>
               <resourceDescription>Ski Team is the demonstration and tutorial database.</resourceDescription>
               <resourceId>54700</resourceId>
               <resourceName>Ski Team</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>DATASOURCE</resourceType>
            </contentResources>
            <contentResources>
               <resourceDescription/>
               <resourceId>54701</resourceId>
               <resourceName>Yellowfin Configuration Database</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>DATASOURCE</resourceType>
            </contentResources>
            <contentResources>
               <resourceDescription/>
               <resourceId>70108</resourceId>
               <resourceName>c</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>DATASOURCE</resourceType>
            </contentResources>
            <contentResources>
               <resourceDescription/>
               <resourceId>70110</resourceId>
               <resourceName>f</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>DATASOURCE</resourceType>
            </contentResources>
            <contentResources>
               <resourceDescription>This is a tutorial view for training and demo purposes.</resourceDescription>
               <resourceId>60543</resourceId>
               <resourceName>Ski Team</resourceName>
               <resourceType>VIEW</resourceType>
               <resourceUUID>e3632adb-5194-460c-a172-c085416f493f</resourceUUID>
            </contentResources>
            <contentResources>
               <resourceDescription>This view should be used to monitor usage of Yellowfin by User and Content Type.</resourceDescription>
               <resourceId>56169</resourceId>
               <resourceName>Yellowfin Usage Audit</resourceName>
               <resourceType>VIEW</resourceType>
               <resourceUUID>fb6416c4-441e-42b3-a442-e7426f25f6b4</resourceUUID>
            </contentResources>
            <contentResources>
               <resourceDescription>This dashboard contains a set of reports covering general system and admin information, including performance, sessions, data source &amp; view usage.</resourceDescription>
               <resourceId>57438</resourceId>
               <resourceName>Admin</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>GROUP</resourceType>
               <resourceUUID>33827292-cda6-4071-965f-730ccbc53519</resourceUUID>
            </contentResources>
            <contentResources>
               <resourceDescription>This is an analytic tab that is used to understand examine metrics split by various demographics and filters.</resourceDescription>
               <resourceId>61195</resourceId>
               <resourceName>Analysis</resourceName>
               <resourceOrgId>1</resourceOrgId>
               <resourceType>GROUP</resourceType>
               <resourceUUID>f19e63f5-7175-4c57-897d-ed865aba8972</resourceUUID>
            </contentResources>
            </contentResources> 
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <sessionId>92029c8ae4f1db0f33bf0b7370c1088a</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
  • Define the request for this function, which includes logging in as the admin user and specifying the web service call to perform:

    Code Block
    languagejava
    themeConfluence
    rsr.setLoginId("admin@yellowfin.com.au"); 
    rsr.setPassword("test"); 
    rsr.setOrgId(1);
    rsr.setFunction("GETCONTENT");
  • You may even identify a specific client organization:

    Code Block
    languagejava
    rsr.setOrgRef("org1");
    
  • Once the request is configured, perform the call:

    Code Block
    languagejava
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

    Initialize the Administration web service. Click here to learn how to do this. 

 

  • The response will contain the following elements: StatusCode and ContentResource. (See details in the Response Parameters table above.)

     

 

 

Complete Example

Below is a full example of this web service call. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_ getcontent.jsp.
  2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
  3. Adjust the host, port, and admin user details according to your environment.
  4. Run http://<host>:<port>/ws_ getcontent.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
<%   	
/*    	ws_getcontent.jsp              	*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
 
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);    	// adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
 
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin webservices admin account
rsr.setPassword("test");                                         	// change to be the password of the account above
rsr.setOrgId(1);
rsr.setFunction("GETCONTENT");
 
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
        	if ("SUCCESS".equals(rs.getStatusCode()) ) {
                    	out.write("<br>Success");
                    	ContentResource[] crs = rs.getContentResources();
                    	out.write("<table>");
                    	out.write("<tr><td> id </td><td> type </td><td> UUID </td></tr>");
                    	for (ContentResource c: crs) {
                                	out.write("<tr>");
                                	out.write("<td>" + c.getResourceId() + "</td><td>" + c.getResourceType() + "</td><td>" + c.getResourceUUID() + "</td>");
                                	out.write("</tr>");
                    	}
        	}
        	else {
        	out.write("<br>Failure");
        	out.write(" Code: " + rs.getErrorCode());
        	}       	
%>


 


 

Expand
titleGETEXPORTDEPENDENCIESEXPORTCONTENT

This function returns all the dependencies of a specific content. The ContentResource object is used to specify the content with the help of the resource ID (which can be retrieved using the GETCONTENT call). For instance if a report is the defined content type, then the response will display its dependencies, such as the report category, sub category, data source, view, etc.exports selected Yellowfin content into an XML file.

 

Request Parameters

The following parameters should be passed with this request:

Request Element

Data Type

Description

LoginId

String

An admin account to connect to Yellowfin web services. This can be the user ID or the email address, depending on the Logon ID method.

This account must have the “web services” role enabled, and must belong to the default (i.e. primary) org.

Password

String

Password of the above account.

OrgId

Integer

Default (i.e. primary) organization ID within Yellowfin. Always set this to 1.

Function

String

Web service function. Set this to "GETEXPORTDEPENDENCIESEXPORTCONTENT".

OrgRefStringThis optional parameter can be used to specify a client org. ID.
ContentResourcesContentResourceObject containing metadata of used to specify the content whose dependencies are that is to be retrievedexported. See table below.

 

The following parameters are specified in the ContentResource object to call this function:

ContentResource Element

Data Type

Description

ResourceIDIntegerMandatory parameter to provide internal ID of the content.
ResourceTypeString

Mandatory parameter to specify the content type. Could be one of:

  • RPTCATEGORY
  • RPTSUBCATEGORY
  • DATASOURCE
  • VIEW
  • GROUP
  • REPORT
  • ETLPROCESS
 ResourceUUIDString This optional parameter can be used to provide the UUID of the content. 

 

Request Example

Below is a SOAP XML example for this request:

Code Block
languagexml
<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>GETEXPORTDEPENDENCIES<<function>EXPORTCONTENT</function>
            <contentResources>
               <resourceId>56169</resourceId>
               <resourceType>VIEW</resourceType>
            </contentResources>          
         </arg0>
      </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope> Envelope>

 

 

Response Parameters

The returned response will contain these parameters:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE
ContentResourcesBinaryAttachmentsContentResourceReportBinaryObject[]Object array containing metadata details of the specified artifactYellowfin's dependencies.

 

 

Response Example

content that can be exported. See table below.

 

The ReportBinaryObject array will return the following parameters with this call:

ReportBinaryObject Element

Data Type

Description

Key

String

The unique key for binary object storage for this function will be "EXPORT/XML".

ContentType

String

The MIME type for this function will be "text/XML".

Data

Byte[]

This array will contain the metadata of the content that can be saved into an XML file.

 

 

Response Example

The service will return the below response, The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <contentResources><binaryAttachments>
               <resourceDescription<contentType>text/xml</>contentType>
               <resourceId>54701</resourceId><data>PD94bFORERST1A8L.....</data>
               <resourceName>Yellowfin Configuration Database</resourceName><key>EXPORTXML</key>
               <resourceOrgId>1</resourceOrgId></binaryAttachments>
               <resourceType>DATASOURCE</resourceType><errorCode>0</errorCode>
            </contentResources>
            <errorCode>0</errorCode>
            <messages>Successfully <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <sessionId>97d7f893d787daf2806a13cdfa6f09d3<<sessionId>111efc95cc598355645e6bf8d588d80f</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
  • Define the request for this function, which includes logging in as the admin user and specifying the web service call to perform:

    Code Block
    languagejava
    themeConfluence
    rsr.setLoginId("admin@yellowfin.com.au"); 
    rsr.setPassword("test"); 
    rsr.setOrgId(1);
    rsr.setFunction("GETEXPORTDEPENDENCIESEXPORTCONTENT");
  • You may even identify a specific client organization:

    Code Block
    languagejava
    rsr.setOrgRef("org1");
    
  • Using a ContentResource object, specify details of the content whose dependencies are to be retrievedSpecify which content to export by using an object:

    Code Block
    languagejava
    ContentResource[] cr = new ContentResource[1];
     
    cr[0] = new ContentResource();
    cr[0].setResourceId(7030770058);
    cr[0].setResourceType("GROUP");
    cr[0].setResourceOrgId(1);
    
  • Then set this Place the object in the your request:

    Code Block
    languagejava
    rsr.setContentResources(cr);
  • Once the request is configured, perform the call:

    Code Block
    languagejava
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

    Initialize the Administration web service. Click here to learn how to do this. 

 

  • The response will contain the following elements: StatusCode and ContentResourceReportBinaryObject. (See details in the Response Parameters table above.)

     

 

 

Complete Example

Below is a full example of this web service call. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_ getexportdependenciesexportcontent.jsp.
  2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
  3. Adjust the host, port, and admin user details according to your environment.
  4. Run http://<host>:<port>/ws_ getexportdependenciesexportcontent.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
<%   	
/*    	ws_getexportdependeciesexportcontent.jsp   	        	*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%@ page import="java.nio.file.Files" %>
<%@ page import="java.io.PrintWriter" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);    	// adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
 
rsr.setLoginId("admin@yellowfin.com.au"); 				// provide your Yellowfin webservicesweb services admin account
rsr.setPassword("test");                                // set to the password of the above account above
rsr.setOrgId(1);
rsr.setFunction("GETEXPORTDEPENDENCIESEXPORTCONTENT");
 
// specify which dashboard to export:
ContentResource[] cr = new ContentResource[1];
 
cr[0] = new ContentResource();
cr[0].setResourceId(7030770058);
cr[0].setResourceType("GROUP");
cr[0].setResourceOrgId(1);
 
rsr.setContentResources(cr);
 
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
 
if ("SUCCESS".equals(rs.getStatusCode()) ) {
        	out.write("<br>Success");
        	ContentResourcebyte[] crsdata = rs.getContentResourcesgetBinaryAttachments()[0].getData();
        	out.write("<table>String xml = new String(data, "UTF-8");
        	out.write("<tr><td> id </td><td> type </td><td> UUID </td></tr>PrintWriter writer = new PrintWriter("/Applications/Yellowfin 7.4/YFexport.xml", "UTF-8");
        	for (ContentResource c: crs) {
writer.println(xml);
        	writer.close();
        	
       	out.write("<tr>" 	ReportBinaryObject[] bo = rs.getBinaryAttachments();
        	for (ReportBinaryObject o : bo){
           	out.write("<td>" + c.getResourceId() + "</td><td>" + c.getResourceType() + "</td><td>         	out.write("<br><br>Key: " + co.getResourceUUIDgetKey() + "</td>");
                    	out.write("</tr>"<br>Content Type: " + o.getContentType());
        	}
        	
 
} else {
        	out.write("Failure");
        	out.write(" Code: " + rs.getErrorCode());
}
%>

 


 

Expand
titleEXPORTCONTENTGETIMPORTCONTENT

This function exports selected Yellowfin content into an XML filereads a provided YFX or XML file and places specific content from it into ContentResource object that can be imported.

 

Request Parameters

The following parameters should be passed with this request:

Request Element

Data Type

Description

LoginId

String

An admin account to connect to Yellowfin web services. This can be the user ID or the email address, depending on the Logon ID method.

This account must have the “web services” role enabled, and must belong to the default (i.e. primary) org.

Password

String

Password of the above account.

OrgId

Integer

Default (i.e. primary) organization ID within Yellowfin. Always set this to 1.

Function

String

Web service function. Set this to "EXPORTCONTENTGETIMPORTCONTENT".

OrgRefStringThis optional parameter can be used to specify a client org. ID.
ContentResourcesParameterContentResourceString[]

This array contains strings with details of

Object used to specify the

content that is to be

exported. See table below.

 

The following parameters are specified in the ContentResource object to call this function:

ContentResource Element

Data Type

Description

ResourceIDIntegerMandatory parameter to provide internal ID of the content.
ResourceTypeString

Mandatory parameter to specify the content type. Could be one of:

  • RPTCATEGORY
  • RPTSUBCATEGORY
  • DATASOURCE
  • VIEW
  • GROUP
  • REPORT
  • ETLPROCESS
 ResourceUUIDString 

imported from a file. The first string is a byte array of UTF-8 string. The second is the file type, that is "YFX" or "XML".

This optional parameter can be used to provide the UUID of the content.

 

 

Request Example

Below is a SOAP XML example for this request:

Code Block
languagexml
<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>EXPORTCONTENT</function>
            <contentResources>
               <resourceId>56169</resourceId>
               <resourceType>VIEW</resourceType>
            </contentResources>          
         </arg0>
      </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Parameters

The returned response will contain these parameters:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE
BinaryAttachmentsReportBinaryObject[]Object array containing details of Yellowfin's content that can be exported. See table below.

 

The ReportBinaryObject array will return the following parameters with this call:

ReportBinaryObject Element

Data Type

Description

Key

String

The unique key for binary object storage for this function will be "EXPORT/XML".

ContentType

String

The MIME type for this function will be "text/XML".

Data

Byte[]

This array will contain the metadata of the content that can be saved into an XML file.

 

 

Response Example

The service will return the below response, according to our SOAP example:

 

 

 

Response Parameters

The returned response will contain these parameters:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE
ContentResourcesContentResource[]Object array containing details of Yellowfin's content to be imported.

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
 

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
  • Define the request for this function, which includes logging in as the admin user and specifying the web service call to perform:

    Code Block
    languagejava
    themeConfluence
    rsr.setLoginId("admin@yellowfin.com.au"); 
    rsr.setPassword("test"); 
    rsr.setOrgId(1);
    rsr.setFunction("GETIMPORTCONTENT");
  • Specify the file containing data that is to be imported:

    Code Block
    languagejava
    Path path = Paths.get("/Applications/Yellowfin 7.4/qwerty.yfx"); 
    
    byte[] data = Files.readAllBytes(path);
    byte[] encodeBase64 = java.util.Base64.getEncoder().encode(data);
    String f = new String(encodeBase64, "UTF-8");
  • Provide the extension of this file, i.e. either YFX or XML:

    Code Block
    languagejava
    rsr.setParameters(new String[]{f,"YFX"});
  • Once the request is configured, perform the call:

    Code Block
    languagejava
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

    Initialize the Administration web service. Click here to learn how to do this. 

 

  • The response will contain the following elements: StatusCode and ContentResource. (See details in the Response Parameters table above.)

     

 

 

Complete Example

Below is a full example of this web service call. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_ getimportcontent.jsp.
  2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
  3. Adjust the host, port, and admin user details according to your environment.
  4. Run http://<host>:<port>/ws_ getimportcontent.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
<%   	
/*    	ws_getimportcontent.jsp
Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <binaryAttachments>
               <contentType>text/xml</contentType>
               <data>PD94bFORERST1A8L.....</data>
               <key>EXPORTXML</key>
            </binaryAttachments>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
	*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%@ page import="java.nio.file.Files" %>
<%@ page import="java.nio.file.Paths" %>
<%@ page import="java.nio.file.Path" %>
 
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);    	// adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
 
rsr.setLoginId("admin@yellowfin.com.au"); 				// provide your Yellowfin web services admin account
rsr.setPassword("test");                    <sessionId>111efc95cc598355645e6bf8d588d80f</sessionId>
            <statusCode>SUCCESS<//statusCode>
 set to the password of the above  </return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
Define the request for this function, which includes logging in as the admin user and specifying the web service call to perform:
Code Block
languagejava
themeConfluence
rsr.setLoginId("admin@yellowfin.com.au"); 
rsr.setPassword("test"); 
rsr.setOrgId(1);
rsr.setFunction("EXPORTCONTENT");
  • Specify which content to export by using an object:

    Code Block
    languagejava
    ContentResource[] cr = new ContentResource[1];
    cr[0] = new ContentResource();
    cr[0].setResourceId(70058);
    cr[0].setResourceType("GROUP");
    cr[0].setResourceOrgId(1);
    
  • Place the object in your request:

    Code Block
    languagejava
    rsr.setContentResources(cr);
  • Once the request is configured, perform the call:
    Code Block
    languagejava
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

    Initialize the Administration web service. Click here to learn how to do this. 

     

    • The response will contain the following elements: StatusCode and ReportBinaryObject. (See details in the Response Parameters table above.)

       

     

     

    Complete Example

    Below is a full example of this web service call. To use it for yourself, carry out the following the steps:

    1. Copy the code and save it as ws_exportcontent.jsp.
    2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
    3. Adjust the host, port, and admin user details according to your environment.
    4. Run http://<host>:<port>/ws_exportcontent.jsp from your Internet browser.

     

    Code Block
    languagejava
    themeEclipse
    <%   	
    /*    	ws_exportcontent.jsp   	account
    rsr.setOrgId(1);
    rsr.setFunction("GETIMPORTCONTENT");
     
    Path path = Paths.get("/Applications/Yellowfin 7.4/qwerty.yfx"); 		// existing file
     
    byte[] data = Files.readAllBytes(path);
    byte[] encodeBase64 = java.util.Base64.getEncoder().encode(data);
    String f = new String(encodeBase64, "UTF-8");
     
    rsr.setParameters(new String[]{f,"YFX"});
     
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
            	ContentResource[] cr = rs.getContentResources();
            	out.write("<br>Success");
            	for (ContentResource o : cr){
                   	*/
    %>
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <%@ page import="java.nio.file.Files" %>
    <%@ page import="java.io.PrintWriter" %>
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);    	// adjust host and port number
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au"); 			// provide your Yellowfin web services admin account
    rsr.setPassword("test");    	out.write("<br><br>resourceType: " + o.getResourceType());
                        	out.write("<br>resourceCode: " + o.getResourceCode());
                        	out.write("<br>resourceName: " + o.getResourceName());
                        	out.write("<br>resourceDescription: " + o.getResourceDescription());
                 // set to the password of the above account
    rsr.setOrgId(1);
    rsr.setFunction("EXPORTCONTENT");
     
    // specify which dashboard to export:
    ContentResource[] cr = new ContentResource[1];
    cr[0] = new ContentResource();
    cr[0].setResourceId(70058);
    cr[0].setResourceType("GROUP");
    cr[0].setResourceOrgId(1);
     
    rsr.setContentResources(cr);
     
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
     	out.write("<br>resourceOrgId: " + o.getResourceOrgId());
                        	out.write("<br>resourceId: " + o.getResourceId());
                        	out.write("<br>Success");
            	byte[] data = rs.getBinaryAttachments()[0].getData(<br>resourceUUID: " + o.getResourceUUID());
            	String}
    } xml = new String(data, "UTF-8");else {
            	PrintWriter writer = new PrintWriter("/Applications/Yellowfin 7.4/YFexport.xml", "UTF-8out.write("Failure");
            	writerout.println(xml);
            	writer.close();
            	
            	ReportBinaryObject[] bo = rs.getBinaryAttachments();
            	for (ReportBinaryObject o : bo){
                        	out.write("<br><br>Key: " + o.getKey());
                        	out.write("<br>Content Type: " + o.getContentType());
            	}
            	
     
    } else {
            	out.write("Failure");
            	out.write(" Code: " + rs.getErrorCode());
    }
    %>
    
    

     

     

    Expand
    titleGETIMPORTCONTENT
    write(" Code: " + rs.getErrorCode());
    }
    %>
    
    
    

     


     

    Expand
    titleGETEXPORTDEPENDENCIES

    This function returns all the dependencies of a specific content. The ContentResource object is used to specify the content with the help of the resource ID (which can be retrieved using the GETCONTENT call). For instance if a report is the defined content type, then the response will display its dependencies, such as the report category, sub category, data source, view, etc.

     

    Request Parameters

    The following parameters should be passed with this request:

    Request Element

    Data Type

    Description

    LoginId

    String

    An admin account to connect to Yellowfin web services. This can be the user ID or the email address, depending on the Logon ID method.

    This account must have the “web services” role enabled, and must belong to the default (i.e. primary) org.

    Password

    String

    Password of the above account.

    OrgId

    Integer

    Default (i.e. primary)

    This function reads a provided YFX or XML file and places specific content from it into ContentResource object that can be imported.

     

    Request Parameters

    The following parameters should be passed with this request:

    Request Element

    Data Type

    Description

    LoginId

    String

    An admin account to connect to Yellowfin web services. This can be the user ID or the email address, depending on the Logon ID method.

    This account must have the “web services” role enabled, and must belong to the default (i.e. primary) org.

    Password

    String

    Password of the above account.

    OrgId

    Integer

    Default (i.e. primary) organization ID within Yellowfin. Always set this to 1.

    Function

    String

    Web service function. Set this to "GETIMPORTCONTENTGETEXPORTDEPENDENCIES".

    OrgRefStringThis optional parameter can be used to specify a client org. ID.
    ParameterContentResourcesString[]

    This array contains strings with details of content that is to be imported from a file. The first string is a byte array of UTF-8 string. The second is the file type, that is "YFX" or "XML".

    ContentResourceObject containing metadata of the content whose dependencies are to be retrieved. See table below.

     

    The following parameters are specified in the ContentResource object to call this function:

    ContentResource Element

    Data Type

    Description

    ResourceIDIntegerMandatory parameter to provide internal ID of the content.
    ResourceTypeString

    Mandatory parameter to specify the content type. Could be one of:

    • RPTCATEGORY
    • RPTSUBCATEGORY
    • DATASOURCE
    • VIEW
    • GROUP
    • REPORT
    • ETLPROCESS
     ResourceUUIDString This optional parameter can be used to provide the UUID of the content. 

     

    Request Example

    Below is a SOAP XML example for this request:

    Code Block
    languagexml
     

     

     

    Response Parameters

    The returned response will contain these parameters:

    Response Element

    Data Type

    Description

    StatusCode

    String

    Status of the web service call. Possible values include:

    • SUCCESS
    • FAILURE
    ContentResourcesContentResource[]Object array containing details of Yellowfin's content to be imported.

     

    Response Example

    The service will return the below response, according to our SOAP example:

    <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>GETEXPORTDEPENDENCIES</function>
                <contentResources>
                   <resourceId>56169</resourceId>
                   <resourceType>VIEW</resourceType>
                </contentResources>          
             </arg0>
          </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope> 

     

     

    Response Parameters

    The returned response will contain these parameters:

    Response Element

    Data Type

    Description

    StatusCode

    String

    Status of the web service call. Possible values include:

    • SUCCESS
    • FAILURE
    ContentResourcesContentResource[]Object array containing metadata of the specified artifact's dependencies.

     

     

    Response Example

    The service will return the below response, according to our SOAP example:

    Code Block
    languagexml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <contentResources>
                   <resourceDescription/>
                   <resourceId>54701</resourceId>
                   <resourceName>Yellowfin Configuration Database</resourceName>
                   <resourceOrgId>1</resourceOrgId>
                   <resourceType>DATASOURCE</resourceType>
                </contentResources>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Web Service Request Complete</messages>
                <sessionId>97d7f893d787daf2806a13cdfa6f09d3</sessionId>
                <statusCode>SUCCESS</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>
    Code Block
    languagexml
     

     

     

    Instructions

    See below for step-by-step instructions on how to perform this call, using a Java example:

    Expand
    titleStep-by-step instructions
    • Define the request for this function, which includes logging in as the admin user and specifying the web service call to perform:

      Code Block
      languagejava
      themeConfluence
      rsr.setLoginId("admin@yellowfin.com.au"); 
      rsr.setPassword("test"); 
      rsr.setOrgId(1);
      rsr.setFunction("GETIMPORTCONTENTGETEXPORTDEPENDENCIES");
    • You may even identify a specific client organization:

      Code Block
      languagejava
      rsr.setOrgRef("org1");
      
    • Using a ContentResource object, specify details of the content whose dependencies are to be retrievedSpecify the file containing data that is to be imported:

      Code Block
      languagejava
      PathContentResource[] pathcr = Paths.get("/Applications/Yellowfin 7.4/qwerty.yfx"); 
      
      byte[] data = Files.readAllBytes(path);
      byte[] encodeBase64 = java.util.Base64.getEncoder().encode(data);
      String f = new String(encodeBase64, "UTF-8");new ContentResource[1];
       
      cr[0] = new ContentResource();
      cr[0].setResourceId(70307);
      cr[0].setResourceType("GROUP");
      cr[0].setResourceOrgId(1);



    • Then set this object in the requestProvide the extension of this file, i.e. either YFX or XML:

      Code Block
      languagejava
      rsr.setParameters(new String[]{f,"YFX"}setContentResources(cr);



    • Once the request is configured, perform the call:

      Code Block
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      Initialize the Administration web service. Click here to learn how to do this. 

     

    • The response will contain the following elements: StatusCode and ContentResource. (See details in the Response Parameters table above.)

       

     

     

    Complete Example

    Below is a full example of this web service call. To use it for yourself, carry out the following the steps:

    1. Copy the code and save it as ws_ getimportcontentgetexportdependencies.jsp.
    2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
    3. Adjust the host, port, and admin user details according to your environment.
    4. Run http://<host>:<port>/ws_ getimportcontentgetexportdependencies.jsp from your Internet browser.

     

    Code Block
    languagejava
    themeEclipse
    <%   	
    /*    	ws_getimportcontentgetexportdependecies.jsp                    	*/
    %>
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <%@ page import="java.nio.file.Files" %>
    <%@ page import="java.nio.file.Paths" %>
    <%@ page import="java.nio.file.Pathio.PrintWriter" %>
     
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);    	// adjust host and port number
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au"); 				// provide your Yellowfin webwebservices services admin account
    rsr.setPassword("test");                                // set to the password of the account above account
    rsr.setOrgId(1);
    rsr.setFunction("GETIMPORTCONTENTGETEXPORTDEPENDENCIES");
     
    PathContentResource[] pathcr = Paths.get("/Applications/Yellowfin 7.4/qwerty.yfx"); 		// existing filenew ContentResource[1];
     
    bytecr[0] data= =new Files.readAllBytesContentResource(path);
    bytecr[0] encodeBase64 = java.util.Base64.getEncoder().encode(data);
    String f = new String(encodeBase64, "UTF-8".setResourceId(70307);
    cr[0].setResourceType("GROUP");
    cr[0].setResourceOrgId(1);
     
    rsr.setParameters(new String[]{f,"YFX"}setContentResources(cr);
     
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
            	ContentResource[] cr = rs.getContentResources();
            	out.write("<br>Success");
            	for (ContentResource[] ocrs : cr){= rs.getContentResources();
                        	out.write("<br><br>resourceType: " + o.getResourceType()<table>");
                        	out.write("<br>resourceCode:<tr><td> "id + o.getResourceCode());
                </td><td> type </td><td> UUID </td></tr>");
            	out.write("<br>resourceNamefor (ContentResource c: " + o.getResourceName());crs) {
                        	out.write("<br>resourceDescription: " + o.getResourceDescription()<tr>");
                        	out.write("<br>resourceOrgId: <td>" + oc.getResourceOrgIdgetResourceId());
     + "</td><td>" + c.getResourceType()                	out.write("<br>resourceId: + "</td><td>" + oc.getResourceIdgetResourceUUID() + "</td>");
                        	out.write("<br>resourceUUID: " + o.getResourceUUID());
         </tr>");
       	}
    } else {
            	out.write("Failure");
            	out.write(" Code: " + rs.getErrorCode());
    }
    %>
    
    
    

     


     

     

    Main Import Functions

     

    Anchor
    TestImportContent
    TestImportContent

    ...