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.

...

Define the request for this function, which includes logging in as the admin user and specifying the web service call to perform:
Expand
titleEXPORTCONTENT

This function 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 "EXPORTCONTENT".

OrgRefStringThis optional parameter can be used to specify a client org. ID.
ContentResourcesContentResourceObject 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 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:

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
Code Block
languagejava
themeConfluence
rsr.setLoginId("admin@yellowfin.com.au"); 
rsr.setPassword("test"); 
rsr.setOrgId(1);
rsr.setFunction("GETCONTENT");
<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>
            <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("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   	        	*/
%>
<%@ 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");                            // 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>Success");
        	byte[] data = rs.getBinaryAttachments()[0].getData();
        	String xml = new String(data, "UTF-8");
        	PrintWriter writer = new PrintWriter("/Applications/Yellowfin 7.4/YFexport.xml", "UTF-8");
        	writer.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());
}
%>

  • 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
     

     


     

    Expand
    titleGETIMPORTCONTENT

    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, etcprepares import content, by placing specified content from a YFX or XML file into a ContentResource object.

     

    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 "GETEXPORTDEPENDENCIESGETIMPORTCONTENT".

    OrgRefStringThis optional parameter can be used to specify a client org. ID.
    ContentResourcesContentResourceObject 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

    ResourceID

     

    IntegerMandatory 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 that can be exported.

     

    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("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
     

     


     

    ...