Versions Compared

Key

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

...

Expand
titleGETCONTENT

こちらの関数は、エクスポート可能なすべてのYellowfinコンテンツを返します。

 

リクエストパラメーター

以下の要素は、こちらのリクエストとともに渡されます。

リクエスト要素データ型説明

LoginId

String

Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

Password

String

上記アカウントのパスワードです。

OrgId

Integer

Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

Function

String

Webサービス関数です。こちらは、「GETCONTENT」に設定します。

OrgRefStringこちらのオプションパラメーターは、クライアント組織IDを指定するために使用することができます。

 

リクエストの例

以下は、こちらのリクエストのSOAP XMLの例です。

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>

 

応答パラメーター

返される応答には、これらのパラメーターが含まれます。

応答要素データ型説明

StatusCode

String

Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。

  • SUCCESS
  • FAILURE
ContentResorcesContentResorce[]エクスポート可能なYellowfinのコンテンツの詳細を含むオブジェクト配列です。

応答の例

サービスは、今回のSOAPの例に基づき、以下の応答を返します。

Code Block
themeEclipse
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>

 

手順

Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

Expand
title詳細手順
  • 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。

    Code Block
    themeEclipse
    languagejava
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    rsr.setFunction("GETCONTENT");
  • 特定のクライアント組織を識別することもできます。

     

    Code Block
    themeEclipse
    languagejava
    rsr.setOrgRef("org1");
  • リクエストを構成したら、呼び出しを実行します。

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

    管理サービスを初期化します。実行方法の詳細は、こちらを参照してください。

 

  • 返される応答には、次の要素が含まれます。:StatusCodeとContentResorce。(より詳細な情報は、上記応答パラメーターの表を参照してください)

 

完成例

以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。

  1. コードをコピーして、「ws_getcontent.jsp」として保存します。
  2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
  3. 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
  4. インターネットブラウザから、「http://<host>:<port>/ws_getcontent.jsp」を実行します。

Code Block
themeEclipse
languagejava
<%      
/*      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
titleEXPORTCONTENT

こちらの関数は、こちらの関数は、選択したYellowfinのコンテンツをXMLファイルにエクスポートします。

 

リクエストパラメーター

以下の要素は、こちらのリクエストとともに渡されます。

リクエスト要素データ型説明

LoginId

String

Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

Password

String

上記アカウントのパスワードです。

OrgId

Integer

Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

Function

String

Webサービス関数です。こちらは、「GETCONTENTEXPORTCONTENT」に設定します。

OrgRefStringこちらのオプションパラメーターは、クライアント組織IDを指定するために使用することができます。
ContentResourcesContentResorceエクスポートするコンテンツを指定するために使用するオブジェクトです。以下の表を参照してください。

 

以下のパラメーターは、こちらの関数を呼び出すためにContentResorceオブジェクトに指定します。

ContentResource要素データ型説明
ResourceIDIntegerコンテンツの内部IDを提供する必須パラメーターです。
ResorceTypeString

コンテンツタイプを指定する必須パラメーターです。選択肢は、以下の通りです。

  • RPTCATEGORY
  • RPTSUBCATEGORY
  • DATASOURCE
  • VIEW
  • GROUP
  • REPORT
  • ETLPROCESS
ResorceUUIDStringこちらのオプションパラメーターは、コンテンツのUUIDを提供するために使用することができます。

 

リクエストの例

以下は、こちらのリクエストのSOAP XMLの例です。

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

 

応答パラメーター

返される応答には、これらのパラメーターが含まれます。

エクスポート可能なYellowfinのコンテンツの詳細を含むオブジェクト配列です。
応答要素データ型説明

StatusCode

String

Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。

  • SUCCESS
  • FAILURE
ContentResorcesContentResorce[]
BinaryAttachmentsReportBinaryObject[]エクスポート可能なYellowfinのコンテンツの詳細を含むオブジェクト配列です。以下の表を参照してください。

 

ReportBinaryObject配列は、こちらの呼び出しに以下のパラメーターを返します。

ReportBinaryObject要素データ型説明
KeyStringこちらの関数のバイナリーオブジェクトストレージに一意のキーは「EXPORT/XML」です。
ContentTypeStringこちらの関数のMIME型は「text/XML」です。
DataByte[]こちらの配列は、XMLファイルに保存可能なコンテンツのメタデータを含みます。

 

 

応答の例

サービスは、今回のSOAPの例に基づき、以下の応答を返します。

Code Block
themeEclipse
languagexml
<S<soapenv:Envelope xmlns:Ssoapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteAdministrationCallResponse xmlns:ns2web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
 <return>     <web:remoteAdministrationCall>
       <contentResources>  <arg0>
          <loginId>admin@yellowfin.com.au</loginId>
  <resourceCode>AUDITREPORTS</resourceCode>                <resourceDescription>Audit Reports</resourceDescription><password>test</password>
               <resourceId>56339</resourceId><orgId>1</orgId>
               <resourceName>Audit Reports</resourceName><function>EXPORTCONTENT</function>
            <contentResources>
  <resourceOrgId>1</resourceOrgId>                <resourceType>RPTCATEGORY</resourceType><resourceId>56169</resourceId>
               <resourceUUID>a6bdc6b5-a832-42a2-98c7-18273900d0aa</resourceUUID><resourceType>VIEW</resourceType>
            </contentResources>         
   <contentResources>      </arg0>
         <resourceCode>ADMINREPORTS</resourceCode></web:remoteAdministrationCall>
               <resourceDescription>Admin Reports</resourceDescription>
               <resourceId>56340</resourceId>
               <resourceName>Admin Reports</resourceName>
               <resourceOrgId>1</resourceOrgId>
      </soapenv:Body>
</soapenv:Envelope>

 

手順

Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

Expand
title詳細手順
  • 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。

    Code Block
    themeEclipse
    languagejava
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    rsr.setFunction("EXPORTCONTENT");
  • オブジェクトを使用してエクスポートするコンテンツを指定します。

     

    Code Block
    themeEclipse
    languagejava
    ContentResource[] cr = new ContentResource[1];
    cr[0] = new ContentResource();
    cr[0].setResourceId(70058);
    cr[0].setResourceType("GROUP");
    cr[0].setResourceOrgId(1);
  • リクエストにオブジェクトを配置します。

     

    Code Block
    themeEclipse
    languagejava
    rsr.setContentResources(cr);
  • リクエストを構成したら、呼び出しを実行します。

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

    管理サービスを初期化します。実行方法の詳細は、こちらを参照してください。

 

  • 返される応答には、次の要素が含まれます。:StatusCodeとReportBinaryObject。(より詳細な情報は、上記応答パラメーターの表を参照してください)

 

完成例

以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。

  1. コードをコピーして、「ws_exportcontent.jsp」として保存します。
  2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
  3. 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
  4. インターネットブラウザから、「http://<host>:<port>/ws_exportcontent.jsp」を実行します。

Code Block
themeEclipse
languagejava
<%      
  <resourceType>RPTSUBCATEGORY</resourceType>*      ws_exportcontent.jsp          <resourceUUID>f7fb32b7-1573-4899-916f-c34afb9a865d</resourceUUID>      */
%>
<%@ page    </contentResources>
            <contentResources>
               <resourceCode>CONTENTUSAGE</resourceCode>
      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 <resourceDescription>Contenthost Usage</resourceDescription>and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
  
<resourceId>56341</resourceId>rsr.setLoginId("admin@yellowfin.com.au");             // provide your <resourceName>ContentYellowfin Usage</resourceName>web services admin account
rsr.setPassword("test");            <resourceOrgId>1</resourceOrgId>                <resourceType>RPTSUBCATEGORY<//resourceType> set to the password of the above account
rsr.setOrgId(1);
rsr.setFunction("EXPORTCONTENT");
  
  <resourceUUID>6bae5230-c1f9-4491-8a8b-f14b1ae660d7</resourceUUID>
            </contentResources>
            <contentResources>
         // 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()) ) {
     <resourceCode>USERACCESS</resourceCode>       out.write("<br>Success");
        <resourceDescription>User Access</resourceDescription>   byte[] data    = rs.getBinaryAttachments()[0].getData();
       <resourceId>56342</resourceId>     String xml = new String(data, "UTF-8");
     <resourceName>User Access</resourceName>      PrintWriter writer = new PrintWriter("/Applications/Yellowfin 7.4/YFexport.xml", "UTF-8");
   <resourceOrgId>1</resourceOrgId>         writer.println(xml);
      <resourceType>RPTSUBCATEGORY</resourceType>      writer.close();
         <resourceUUID>0c7ddde4-fa03-4e88-b37b-7b5e4aad5e1d</resourceUUID>    
        </contentResources>    ReportBinaryObject[] bo = rs.getBinaryAttachments();
     <contentResources>       for (ReportBinaryObject o : bo){
    <resourceCode>TUTORIAL</resourceCode>                <resourceDescription>Tutorial</resourceDescription>    out.write("<br><br>Key: " + o.getKey());
        <resourceId>60706</resourceId>                <resourceName>Tutorial</resourceName>
   out.write("<br>Content Type: " + o.getContentType());
           <resourceOrgId>1</resourceOrgId> }
             
<resourceType>RPTCATEGORY</resourceType>  
} else {
          <resourceUUID>a23c2ec6-a2fa-45c7-b5da-dcf3f02e6633</resourceUUID>
   out.write("Failure");
          </contentResources>  out.write(" Code: " + rs.getErrorCode());
      <contentResources>
               <resourceCode>ATHLETES</resourceCode>}
%>
Expand
titleGETEXPORTDEPENDENCIES

こちらの関数は、特定のコンテンツのすべての依存関係を返します。ContentResourceオブジェクトは、リソースID(GETCONTENTの呼び出しを使用して取得することができます)とともにコンテンツを指定するために使用します。 例えば、レポートが定義されたコンテンツタイプであれば、応答にはレポートカテゴリー、サブカテゴリー、データソース、ビューなどの依存関係が表示されます。

 

リクエストパラメーター

以下の要素は、こちらのリクエストとともに渡されます。

リクエスト要素データ型説明

LoginId

String

Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

Password

String

上記アカウントのパスワードです。

OrgId

Integer

Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

Function

String

Webサービス関数です。こちらは、「GETEXPORTDEPENDENCIES」に設定します。

OrgRefStringこちらのオプションパラメーターは、クライアント組織IDを指定するために使用することができます。
ContentResourcesContentResorce依存関係を取得するコンテンツのメタデータを含むオブジェクトです。以下の表を参照してください。

 

以下のパラメーターは、こちらの関数を呼び出すためにContentResorceオブジェクトに指定します。

ContentResource要素データ型説明
ResourceIDIntegerコンテンツの内部IDを提供する必須パラメーターです。
ResorceTypeString

コンテンツタイプを指定する必須パラメーターです。選択肢は、以下の通りです。

  • RPTCATEGORY
  • RPTSUBCATEGORY
  • DATASOURCE
  • VIEW
  • GROUP
  • REPORT
  • ETLPROCESS
ResorceUUIDStringこちらのオプションパラメーターは、コンテンツのUUIDを提供するために使用することができます。

 

リクエストの例

以下は、こちらのリクエストのSOAP XMLの例です。

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

 

応答パラメーター

返される応答には、これらのパラメーターが含まれます。

応答要素データ型説明

StatusCode

String

Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。

  • SUCCESS
  • FAILURE
ContenResourcesContentResource[]指定した成果物の依存関係のメタデータを含むオブジェクト配列です。以下の表を参照してください。

 

応答の例

サービスは、今回のSOAPの例に基づき、以下の応答を返します。

Code Block
themeEclipse
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>

 

手順

Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

Expand
title詳細手順
  • 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。

    Code Block
    themeEclipse
    languagejava
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    rsr.setFunction("GETEXPORTDEPENDENCIES");
  • 特定のクライアント組織を識別することもできます。

     

    Code Block
    themeEclipse
    languagejava
    rsr.setOrgRef("org1");
  • ContentResourceオブジェクトを使用して、依存関係を取得するコンテンツの詳細を指定します。

     

    Code Block
    themeEclipse
    languagejava
    ContentResource[] cr = new ContentResource[1];
      
    cr[0] = new ContentResource();
    cr[0].setResourceId(70307);
    cr[0].setResourceType("GROUP");
    cr[0].setResourceOrgId(1);
  • リクエストにオブジェクトを配置します。

     

    Code Block
    themeEclipse
    languagejava
    rsr.setContentResources(cr);
  • リクエストを構成したら、呼び出しを実行します。

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

    管理サービスを初期化します。実行方法の詳細は、こちらを参照してください。

 

  • 返される応答には、次の要素が含まれます。:StatusCodeとContentResource。(より詳細な情報は、上記応答パラメーターの表を参照してください)

 

完成例

以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。

  1. コードをコピーして、「ws_getexportdependencies.jsp」として保存します。
  2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
  3. 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
  4. インターネットブラウザから、「http://<host>:<port>/ws_getexportdependencies.jsp」を実行します。

Code Block
themeEclipse
languagejava
<%      
/*      ws_getexportdependecies.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 webservices admin account
rsr.setPassword("test");                                // set to the password of the account above
rsr.setOrgId(1);
rsr.setFunction("GETEXPORTDEPENDENCIES");
  
ContentResource[] cr = new ContentResource[1];
  
cr[0] = new ContentResource();
cr[0].setResourceId(70307);
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");
            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("Failure");
            out.write(" Code: " + rs.getErrorCode());
}
%>

 

 

 

 

インポートwebサービス

Yellowfinのインポートwebサービスを使用するには、以下のヒントを参照してください。

webサービスを使用してコンテンツをインポートするためには、YFX、またはXMLファイルが必要です。これは、EXPORTCONTENT関数を呼び出すことで取得します。

Yellowfinのエクスポート機能を使用しても取得することができます。しかし、この機能を介して生成されるファイルには、現在webサービスAPIにサポートされているコンテンツタイプよりも多くが含まれています。

次のコンテンツタイプは、webサービスを介してインポートすることができません。:イメージ、テーマ、ストーリーボード、ユーザー、ユーザーグループ

エクスポートファイルを取得したら、ContentResourceオブジェクトにインポートするコンテンツを準備する、GETIMPORTCONTENT関数に渡します。

こちらのオブジェクトの詳細を使用して、ImportOptionと呼ばれる他のオブジェクトを設定し、それをIMPORTCONTENT、またはIMPORTIMPORTCONTENTNOVALIDATION関数に渡すことで、対象のコンテンツをYellowfinにインポートします。ImportOptionは、optionKeyパラメーターを使用することで、インポートするコンテンツを指定することができます。

インポート時に、ImportOptionオブジェクトを設定しない場合、ファイル内のすべてのコンテンツがインポートされます。

インポートするコンテンツのテストや検証を行うには、TESTIMPORTCONTENT、またはTESTIMPORTCONTENTNOVALIDATION webサービスを使用します。

注意:IMPORTCONTENT関数の例は、Yellowfinのインストールフォルダー内のImportOptionを変更するユーザーインターフェイスと連携しています。:development/examples/webservices/ws_admin_import.jsp。こちらのファイルを、Yellowfin/appserver/webapps/ROOTフォルダーに配置し、ホスト、ポート番号、管理ユーザーの詳細を調整します。そしてこれを、インターネットブラウザから実行します。(http://<host>:<port>/ws_admin_import.jsp)


 

 

Expand
titleImportContentオブジェクトのセットアップ

インポートするコンテンツを指定するImportCOntentオブジェクトをセットアップするには、optionValueを提供することで、optionKeyパラメーターを定義しなくてはいけません。こちらは、利用可能な組み合わせの例です。

 

optionKeyoptionValue
SKIP「true」、または「falseに設定します。
OPTION「REPLACE」、または「ADD」に設定します。
EXISTING

対象のYellowfinインスタンス内の既存アイテムのUUIDです。

これは、「optionKey=OPTION」、と「optionValue=REPLACE」に設定することで機能します。

PASSWORD1インポート中にコンテンツを暗号化する場合のデータソースパスワードです。

 

例えば、あるYellowfinレポートを、その依存関係(データソース、ビュー、カテゴリー、サブカテゴリー)とともにエクスポートする場合、ContentResourceオブジェクト(GETIMPORTCONTENTの呼び出しにより取得します)は、以下のように表示されます。

ResourceIdResourceTypeResourceNameResourceUUID

70031

DATASOURCE

CSV

null

70209

VIEW

months

b974f55a-269b-4a4b-b1c6-bf9b968be723

null

RPTCATEGORY

Tutorial

a23c2ec6-a2fa-45c7-b5da-dcf3f02e6633

null

RPTSUBCATEGORY

Reports

58834ae1-2f65-44c0-b6c3-7c9cd2f91bd5

70279

REPORT

My Report

fd3794b3-62c0-4cf8-bac0-755e68d9c41e

 

次に、5つのすべてのアイテムに対して、インポートオプションを定義しなくてはいけません。ImportOptionのitemIndexパラメーターは、各ContentResourceアイテムのindex番号に対応しているので、上記のContentResource配列の例では、次のように表示されます。

ResourceIdResourceTypeimportOption itemIndex

70031

DATASOURCE

0

70209

VIEW

1

null

RPTCATEGORY

2

null

RPTSUBCATEGORY

3

70279

REPORT

4

 

今回の例のレポートを他のレポートに置き換え、その他のコンテンツをインポートしない場合、ImportOptionオブジェクトの構成は、以下のようになります。

itemIndexoptionKeyoptionValue注意

0

SKIP

true

データソースはスキップされます。

1

SKIP

true

ビューはスキップされます。

2

SKIP

true

カテゴリーはスキップされます。

3

SKIP

true

サブカテゴリーはスキップされます。

4

SKIP

false

レポートがインポートされます。

4

OPTION

REPLACE

既存のレポートは、インポートされるレポートに置きかわります。

4

EXISTING

70287

インポートされるレポートにより置き換わる対象のYellowfin内の既存レポートのレポートIDです。

 

コンテンツを「新規」としてインポートする場合、その依存関係をImportOptionオブジェクト内で指定しなくてはいけません。そのため、新規レポートは、必要な依存関係(ビュー、カテゴリー、サブカテゴリー)のインポートなしにインポートすることができません。(注意:エクスポートファイルから取得される依存関係を使用する代わりに、レポートの依存関係を対象環境内の既存のものと置き換える選択をすることができます)

コンテンツ必要な依存関係
レポートビュー、カテゴリー、サブカテゴリー
ビューデータソース
ダッシュボード

カテゴリー、サブカテゴリー

 

 

 

主要なインポート関数

Expand
titleGETIMPORTCONTENT

こちらの関数は、提供されるYFX、またはXMLファイルを読み、特定のコンテンツをインポート可能なCOntentResourceオブジェクトへ配置します。

 

リクエストパラメーター

以下の要素は、こちらのリクエストとともに渡されます。

リクエスト要素データ型説明

LoginId

String

Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

Password

String

上記アカウントのパスワードです。

OrgId

Integer

Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

Function

String

Webサービス関数です。こちらは、「GETIMPORTCONTENT」に設定します。

OrgRefStringこちらのオプションパラメーターは、クライアント組織IDの指定に使用することができます。
ParameterString[]こちらの配列は、ファイルからインポートされるコンテンツの詳細とStringsを含みます。最初のStringは、UTF-8 Stringのbyte配列です。次はファイルタイプであり、「YFX」、または「XML」になります。

 

応答パラメーター

返される応答には、これらのパラメーターが含まれます。

応答要素データ型説明

StatusCode

String

Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。

  • SUCCESS
  • FAILURE
ContenResourcesContentResource[]インポートするYellowfinコンテンツの詳細を含むオブジェクト配列です。

  

手順

Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

Expand
title詳細手順
  • 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。

    Code Block
    themeEclipse
    languagejava
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    rsr.setFunction("GETIMPORTCONTENT");
  • インポートするデータを含むファイルを指定します。

     

    Code Block
    themeEclipse
    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");
  • ファイルの拡張子を提供します。例:YFX、またはXMLのいずれかです。

     

    Code Block
    themeEclipse
    languagejava
    rsr.setParameters(new String[]{f,"YFX"});
  • リクエストを構成したら、呼び出しを実行します。

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

    管理サービスを初期化します。実行方法の詳細は、こちらを参照してください。

 

  • 返される応答には、次の要素が含まれます。:StatusCodeとContentResource。(より詳細な情報は、上記応答パラメーターの表を参照してください)

 

完成例

以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。

  1. コードをコピーして、「ws_getimportcontent.jsp」として保存します。
  2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
  3. 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
  4. インターネットブラウザから、「http://<host>:<port>/ws_getimportcontent.jsp」を実行します。

Code Block
themeEclipse
languagejava
<%      
/*      ws_getimportcontent.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.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");                                // set to the password of the above 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){
                        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());
                        out.write("<br>resourceOrgId: " + o.getResourceOrgId());
                        out.write("<br>resourceId: " + o.getResourceId());
                        out.write("<br>resourceUUID: " + o.getResourceUUID());
            }
} else {
            out.write("Failure");
            out.write(" Code: " + rs.getErrorCode());
}
%>
Expand
titleIMPORTCONTENT

こちらの関数は、XML、またはYFXファイルからコンテンツをYellowfinへインポートします。

 

リクエストパラメーター

以下の要素は、こちらのリクエストとともに渡されます。

リクエスト要素データ型説明

LoginId

String

Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

Password

String

上記アカウントのパスワードです。

OrgId

Integer

Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

Function

String

Webサービス関数です。こちらは、「IMPORTCONTENT」に設定します。

OrgRefStringこちらのオプションパラメーターは、クライアント組織IDの指定に使用することができます。
ParameterString[]こちらの配列は、インポート、検証されるコンテンツの詳細とStringsを含みます。最初のStringは、UTF-8 Stringのbyte配列です。次はファイルタイプであり、「YFX」、または「XML」になります。
ImportOptionsImportOption[]こちらのオプションパラメーターは、コンテンツのインポート方法を定義するために使用することができます。こちらを指定しない場合、Yellowfinはすべてのコンテンツを新規として、ファイルに含まれるそのままの状態でインポートします。

 

リクエストの例

以下は、こちらのリクエストのSOAP XMLの例です。

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>
         <!--Optional:-->
         <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <function>IMPORTCONTENT</function>
            <parameters>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0i ... </parameters>
            <parameters>XML</parameters>
            <importOption>
                    <optionIndex>0</optionIndex>
                        <optionKey>OPTION</optionKey>
                        <optionValue>REPLACE</optionValue>
                    <optionIndex>1</optionIndex>
                        <optionKey>EXISTING</optionKey>
                        <optionValue>70279</optionValue>
             </importOption>
          </arg0>
      </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>

 

応答パラメーター

返される応答には、これらのパラメーターが含まれます。

応答要素データ型説明

StatusCode

String

Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。

  • SUCCESS
  • FAILURE

注意:ステータスは、実際のインポートが実行されたかどうかに関わらず、呼び出しが実行されたかどうかに対応します。

  

応答の例

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>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <sessionId>3c25c8a81c971e26bd23d4ed60194fba</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>

 

手順

Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

Expand
title詳細手順
  • 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。

    Code Block
    themeEclipse
    languagejava
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    rsr.setFunction("IMPORTCONTENT");
  • インポートするデータを含むファイルを指定します。

     

    Code Block
    themeEclipse
    languagejava
    Path path = Paths.get("/Applications/Yellowfin 7.4/YFexport.xml");
      
    byte[] data = Files.readAllBytes(path);
    byte[] encodeBase64 = java.util.Base64.getEncoder().encode(data);
    String f = new String(encodeBase64, "UTF-8");
  • ファイルの拡張子を提供します。例:YFX、またはXMLのいずれかです。

     

    Code Block
    themeEclipse
    languagejava
    rsr.setParameters(new String[]{f,"XML"});
  • ファイル内のコンテンツのインポート方法を指定します。

     

    Code Block
    themeEclipse
    languagejava
    ImportOption[] options = new ImportOption[2];
    options[0] = new ImportOption();
    options[0].setItemIndex(0);
    options[0].setOptionKey("OPTION");
    options[0].setOptionValue("REPLACE");
                 
    options[1] = new ImportOption();
    options[1].setItemIndex(0);
    options[1].setOptionKey("EXISTING");
    options[1].setOptionValue("70279");
  • リクエストにインポートオプションオブジェクトを設定します。

     

    Code Block
    themeEclipse
    languagejava
    rsr.setImportOptions(options);
  • リクエストを構成したら、呼び出しを実行します。

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

    管理サービスを初期化します。実行方法の詳細は、こちらを参照してください。

 

  • 返される応答には、次の要素が含まれます。:StatusCode。(より詳細な情報は、上記応答パラメーターの表を参照してください)

 

完成例

以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。

  1. コードをコピーして、「ws_importcontent.jsp」として保存します。
  2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
  3. 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
  4. インターネットブラウザから、「http://<host>:<port>/ws_importcontent.jsp」を実行します。

Code Block
themeEclipse
languagejava
<%      
/*      ws_importcontent.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.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");                                    // set to the password of the above account
rsr.setOrgId(1);
rsr.setFunction("IMPORTCONTENT");
  
/*      Yfexport.xml contains just one report with no dependencies
            which can be retrieved using an <resourceDescription>Athletes</resourceDescription>EXPORTCONTENT web service call and passing a single report id.
      <resourceId>60707</resourceId>      FYI. Latest Yellowfin builds do not allow export Yellowfin content <resourceName>Athletes</resourceName>WITHOUT dependencies,
            so ImportOption <resourceOrgId>1</resourceOrgId>in this example will not suit any YFX file.
       <resourceType>RPTSUBCATEGORY</resourceType>     You need to define proper ImportOption anyway
*/
Path path  <resourceUUID>72e4b4bd-a482-4a01-a031-c6ab76dbb3a5</resourceUUID>
= Paths.get("/Applications/Yellowfin 7.4/YFexport.xml");
  
byte[] data = Files.readAllBytes(path);
byte[] encodeBase64   </contentResources>
     = java.util.Base64.getEncoder().encode(data);
String f = new String(encodeBase64, "UTF-8");
  
rsr.setParameters(new String[]{f,"XML"});
 <contentResources> 
            ImportOption[] options <resourceCode>CAMP</resourceCode>= new ImportOption[2];
             <resourceDescription>Camp</resourceDescription>
 options[0] = new ImportOption();
             <resourceId>60708</resourceId>options[0].setItemIndex(0);
            options[0].setOptionKey("OPTION");
   <resourceName>Camp</resourceName>         options[0].setOptionValue("REPLACE");
      <resourceOrgId>1</resourceOrgId>        
       <resourceType>RPTSUBCATEGORY</resourceType>     options[1] = new ImportOption();
       <resourceUUID>465411e5-594b-478e-af64-c0f59fc4546f</resourceUUID>     options[1].setItemIndex(0);
       </contentResources>     options[1].setOptionKey("EXISTING");
       <contentResources>      
         <resourceCode>KPIS</resourceCode>   /*      existing report Id. Can be retrieved from <resourceDescription>KPIs</resourceDescription>ReportHeader table of Yellowfin database, ReportId column.
         <resourceId>60709</resourceId>               keep <resourceName>KPIs</resourceName>in mind that the reportId changes each time when a user modifies the report.
  <resourceOrgId>1</resourceOrgId>                <resourceType>RPTSUBCATEGORY</resourceType>      You can use the GETIDFORUUID call to    <resourceUUID>d514c643-dc01-4781-8905-d34e761ccd19</resourceUUID>
     get the valid reportId value for the report.
      </contentResources>      */
      <contentResources>      options[1].setOptionValue("70279");
         <resourceCode>MARKETINGBOOKING</resourceCode>    
rsr.setImportOptions(options);
  
AdministrationServiceResponse rs1 = adminService.remoteAdministrationCall(rsr);
    <resourceDescription>Marketing &amp; Booking</resourceDescription>       
        <resourceId>60710</resourceId>    if ("SUCCESS".equals(rs1.getStatusCode()) ) {
        <resourceName>Marketing &amp; Booking</resourceName>              out.write("<br>Test  <resourceOrgId>1</resourceOrgId>Import Success");
            }
  <resourceType>RPTSUBCATEGORY</resourceType>          else {
    <resourceUUID>dbe6d0a3-c088-4d71-b65a-f383aaa54be9</resourceUUID>        out.write("Failure");
    </contentResources>        out.write(" Code: " + rs1.getErrorCode());
<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>
      %>
Expand
titleIMPORTCONTENTNOVALIDATION

こちらのwebサービスは、データソースの検証を行わない以外は、IMPORTCONTENTと同様です。

Expand
titleTESTIMPORTCONTENT

こちらの関数は、YFX、またはXMLファイルからコンテンツをインポートし、テスト、または検証を行います。

 

リクエストパラメーター

以下の要素は、こちらのリクエストとともに渡されます。

リクエスト要素データ型説明

LoginId

String

Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

Password

String

上記アカウントのパスワードです。

OrgId

Integer

Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

Function

String

Webサービス関数です。こちらは、「TESTIMPORTCONTENT」に設定します。

OrgRefStringこちらのオプションパラメーターは、クライアント組織IDの指定に使用することができます。
ParameterString[]こちらの配列は、インポート、検証されるコンテンツの詳細とStringsを含みます。最初のStringは、UTF-8 Stringのbyte配列です。次はファイルタイプであり、「YFX」、または「XML」になります。
ImportOptionsImportOption[]こちらのオプションパラメーターは、コンテンツのインポート方法を定義するために使用することができます。

 

リクエストの例

以下は、こちらのリクエストのSOAP XMLの例です。

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>
 <resourceName>Oracle database</resourceName>       <!--Optional:-->
        <resourceOrgId>1</resourceOrgId> <arg0>
              <resourceType>DATASOURCE</resourceType><loginId>admin@yellowfin.com.au</loginId>
            <<password>test</contentResources>password>
            <contentResources><orgId>1</orgId>
               <resourceDescription/><function>TESTIMPORTCONTENT</function>
            <parameters>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0i ...  <resourceId>70109<</resourceId>parameters>
            <parameters>XML</parameters>
  <resourceName>Oracle</resourceName>          <importOption>
     <resourceOrgId>1</resourceOrgId>               <optionIndex>0</optionIndex>
<resourceType>DATASOURCE</resourceType>             </contentResources>           <optionKey>OPTION</optionKey>
 <contentResources>                <resourceDescription>Ski Team is the demonstration and tutorial database.<<optionValue>REPLACE</resourceDescription>optionValue>
               <resourceId>54700</resourceId>            <optionIndex>1</optionIndex>
   <resourceName>Ski Team</resourceName>                <resourceOrgId>1</resourceOrgId>    <optionKey>EXISTING</optionKey>
           <resourceType>DATASOURCE</resourceType>             <<optionValue>70279</contentResources>optionValue>
            <contentResources> </importOption>
          </arg0>
   <resourceDescription/>   </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope> 

 

応答パラメーター

返される応答には、これらのパラメーターが含まれます。

応答要素データ型説明

StatusCode

String

Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。

  • SUCCESS
  • FAILURE
ImportIssuesImportIssue[]

ファイルインポート中に発生した問題を含むオブジェクト配列です。

ContentResourcesContentResource[]インポートするYellowfinコンテンツの詳細を含むオブジェクト配列です。

  

応答の例

サービスは、今回のSAOPの例に基づき、以下の応答を返します。

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
  <resourceId>54701</resourceId>    <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
<resourceName>Yellowfin Configuration Database</resourceName>          <contentResources>
     <resourceOrgId>1</resourceOrgId>          <resourceDescription>months, 6/3/2018 8:53 AM</resourceDescription>
  <resourceType>DATASOURCE</resourceType>             <<resourceId>70279</contentResources>resourceId>
            <contentResources><resourceName>My Report 1000</resourceName>
             <resourceDescription<resourceType>REPORT</>resourceType>
               <resourceId>70108</resourceId><resourceUUID>fd3794b3-62c0-4cf8-bac0-755e68d9c41e</resourceUUID>
            </contentResources>
  <resourceName>c</resourceName>          <errorCode>0</errorCode>
       <resourceOrgId>1</resourceOrgId>     <importIssues>
          <resourceType>DATASOURCE</resourceType>  <issueElements>
          </contentResources>      <messageKey>error.reports.import.view</messageKey>
      <contentResources>          <renderedMessage>View has not been selected.</renderedMessage>
 <resourceDescription/>           </issueElements>
    <resourceId>70110</resourceId>        <issueElements>
       <resourceName>f</resourceName>           <messageKey>error.reports.import.category</messageKey>
    <resourceOrgId>1</resourceOrgId>            <renderedMessage>Folder has not been <resourceType>DATASOURCE<selected.</resourceType>renderedMessage>
            </contentResources>issueElements>
            <contentResources><resource>
               <resourceDescription>This is a tutorial view for training and demo purposes.</resourceDescription><resourceDescription>months, 6/3/2018 8:53 AM</resourceDescription>
                  <resourceId>60543<<resourceId>70279</resourceId>
                <resourceName>My <resourceName>SkiReport Team<1000</resourceName>
               <resourceType>VIEW<   <resourceType>REPORT</resourceType>
                <resourceUUID>e3632adb  <resourceUUID>fd3794b3-519462c0-460c4cf8-a172bac0-c085416f493f</resourceUUID>
            </contentResources>755e68d9c41e</resourceUUID>
            </resource>
<contentResources>            </importIssues>
   <resourceDescription>This view should be used to monitor usage of Yellowfin<messages>Successfully byAuthenticated User and Content Type.</resourceDescription>: admin@yellowfin.com.au</messages>
            <messages>Web Service Request <resourceId>56169<Complete</resourceId>messages>
            <sessionId>ab398569ce36672e9d776c3dae3804d6</sessionId>
  <resourceName>Yellowfin Usage Audit</resourceName>      <statusCode>SUCCESS</statusCode>
         <resourceType>VIEW<</resourceType>return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>

 

手順

Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

Expand
title詳細手順
  • 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。

    Code Block
    themeEclipse
    languagejava
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    rsr.setFunction("TESTIMPORTCONTENT");
  • インポートするデータを含むファイルを指定します。

     

    Code Block
    themeEclipse
    languagejava
    Path path 
<resourceUUID>fb6416c4-441e-42b3-a442-e7426f25f6b4</resourceUUID> </contentResources> <contentResources>
  • = 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");
  • ファイルの拡張子を提供します。例:YFX、またはXMLのいずれかです。

     

    Code Block
    themeEclipse
    languagejava
    rsr.setParameters(new String[]{f,"YFX"});
  • リクエストを構成したら、呼び出しを実行します。

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

    管理サービスを初期化します。実行方法の詳細は、こちらを参照してください。

 

  • インポートしたコンテンツをテストします。

     

    Code Block
    themeEclipse
    languagejava
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
              
<resourceDescription>This
  •  
dashboard contains a set of reports covering general system and admin information, including performance, sessions, data source &amp; view usage.</resourceDescription>
  •  out.write("<br>Success");
    
                ContentResource[] crs = rs.getContentResources();
    
                ImportIssue[] ImportIssues 
<resourceId>57438</resourceId>
  • = rs.getImportIssues();
                out.write("<br>Import Issues: 
<resourceName>Admin</resourceName>
  • " + (ImportIssues!=null?ImportIssues.length:"no issues"));
    
               
<resourceOrgId>1</resourceOrgId>
  •  out.write("<table>");
                out.write("<tr><td> ResourceId 
<resourceType>GROUP<
  • </
resourceType>
  • td><td> ResourceType </td><td> ResourceName 
  • </td><td> ResourceUUID </td></tr>");
            
<resourceUUID>33827292-cda6-4071-965f-730ccbc53519</resourceUUID>
  •     for (ContentResource c: crs) {
        
</contentResources>
  •              
<contentResources>
  •        out.write("<tr>");
           
<resourceDescription>This
  •  
is
  •  
an
  •  
analytic
  •  
tab
  •  
that
  •  
is
  •  
used
  •  
to
  •  
understand
  •  
examine
  •  
metrics
  •  
split
  •  
by
  •  
various
  •  
demographics
  •  
and
  •  
filters.</resourceDescription> <resourceId>61195</resourceId>
  • out.write("<td>" + c.getResourceId() + "</td><td>" + c.getResourceType() + "</td><td>" + c.getResourceName() + "</td><td>" + c.getResourceUUID() + "</td>");
                   
<resourceName>Analysis</resourceName>
  •          out.write("</tr>");
       }
    } else 
<resourceOrgId>1</resourceOrgId>
  • {
                out.write("Failure");
      
<resourceType>GROUP</resourceType>
  •           out.write(" Code: " + 
<resourceUUID>f19e63f5-7175-4c57-897d-ed865aba8972</resourceUUID>
  • rs.getErrorCode());
    }
  • 応答は、次の要素を含みます。StatusCode、ImportIssues、ContentResorces。(より詳細な情報は、上記応答パラメーターの表を参照してください)

 

 

完成例

以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。

  1. コードをコピーして、「ws_testimportcontent.jsp」として保存します。
  2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
  3. 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
  4. インターネットブラウザから、「http://<host>:<port>/ws_testimportcontent.jsp」を実行します。

Code Block
themeEclipse
languagejava
<%      
     </contentResources>/*      ws_testimportcontent.jsp       </contentResources>             <errorCode>0<*/errorCode>
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*,  <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <sessionId>92029c8ae4f1db0f33bf0b7370c1088a</sessionId>
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);            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>

 

手順

Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

Expand
title詳細手順
インターネットブラウザから、「http://<host>:<port>/ws_getcontent.jsp」を実行します。
// adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
  
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("GETCONTENT");
  • 特定のクライアント組織を識別することもできます。

     

  • Code Block
    themeEclipse
    languagejava
    管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。
    Code Block
    themeEclipse
    languagejava
    Code Block
    themeEclipse
    languagejava
    rsr.setOrgRef("org1");
    リクエストを構成したら、呼び出しを実行します。
    Code Block
    languagejava
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

    管理サービスを初期化します。実行方法の詳細は、こちらを参照してください。

     

    返される応答には、次の要素が含まれます。:StatusCodeとContentResorce。(より詳細な情報は、上記応答パラメーターの表を参照してください)

     

    完成例

    以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。

  • コードをコピーして、「ws_getcontent.jsp」として保存します。
  • root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
  • 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
  • <%      
    /*                 // provide your Yellowfin web services admin account
    rsr.setPassword("test");       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        // set to the password of the above account
    rsr.setOrgId(1);
    rsr.setFunction("TESTIMPORTCONTENT");
      
    Path path = Paths.get("/Applications/Yellowfin 7.4/www.yfx");             // adjustexisting hostfile
    and port number
    AdministrationServiceSoapBindingStubbyte[] adminServicedata = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService(Files.readAllBytes(path);
    AdministrationServiceRequestbyte[] rsrencodeBase64 = new AdministrationServiceRequest();
      
    rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin webservices admin account
    rsr.setPassword("test");                               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()) ) {
              // change to be the password of the account above
    rsr.setOrgId(1);
    rsr.setFunction("GETCONTENT"); out.write("<br>Success");
                AdministrationServiceResponse rs
    = adminService.remoteAdministrationCall(rsr);           ContentResource[] crs if ("SUCCESS".equals(= rs.getStatusCodegetContentResources()) ) {
       ;
                 
          out.write("<br>Success");      ImportIssue[] ImportIssues = rs.getImportIssues();
                out.write("<br>Import Issues: " ContentResource[] crs = rs.getContentResources(+ (ImportIssues!=null?ImportIssues.length:"no issues"));
                 
                out.write("<table>");
            
                   out.write("<tr><td> id ResourceId </td><td> ResourceType </td><td> typeResourceName </td><td> UUIDResourceUUID </td></tr>");
      
                         for (ContentResource c: crs) {
               
                            out.write("<tr>");
               ");
                            out.write("<td>" + c.getResourceId() + "</td><td>" + c.getResourceType() + "</td><td>" + c.getResourceName() + "</td><td>" + c.getResourceUUID() + "</td>");
     
                                      out.write("</tr>");
                     
          }
           
        }             else {
                out.write("<br>FailureFailure");
                out.write(" Code: " + rs.getErrorCode());
                }         
    
    %>%>
    Expand
    titleTESTIMPORTCONTENTNOVALIDATION

    こちらのwebサービスは、データソースの検証を行わない以外は、TESTIMPORTCONTENTと同様です。