30日間の無料評価版をお試しいただけます。

Versions Compared

Key

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

...

Expand
titleLISTROLES

こちらの関数は、Yellowfinで利用可能なすべてのユーザーロールを返します。応答は、利用可能なロールを表示する、AdministrationRoleオブジェクトの配列を含みます。

 

リクエスト要素

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

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

LoginId

String

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

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

Password

String

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

OrgId

Integer

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

Function

String

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

 

リクエストの例

以下のSOAPの例は、この呼び出しに渡すことのできるパラメーターを表示しています。

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>LISTROLES</function>                           
         </arg0>
      </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>

 

応答要素

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

応答要素データ型説明

StatusCode

String

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

  • SUCCESS
  • FAILURE
RolesAdministrationRole[]

ロールの一覧です。

 

応答の例

サービスは、今回の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>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <roles>
               <functions>
                  <accessLevelCode>CRUD</accessLevelCode>
                  <functionCode>ACTIVITYSTREAM</functionCode>
                  <functionDescription>Allows users to access the activity stream.</functionDescription>
                  <functionName>Activity Stream</functionName>
               </functions>
               <functions>
                  <accessLevelCode>CRUD</accessLevelCode>
                  <functionCode>TIMELINE</functionCode>
                  <functionDescription>Allows users to access their timeline.</functionDescription>
                  <functionName>Timeline</functionName>
               </functions>
               <functions>
                  <accessLevelCode>CRUD</accessLevelCode>
                  <functionCode>BROADCASTSUBSCRIBE</functionCode>
                  <functionDescription>Allows users to subscribe to report broadcasts.</functionDescription>
                  <functionName>Subscribe to Broadcast</functionName>
               </functions>
               <functions>
                  <accessLevelCode>R</accessLevelCode>
                  <functionCode>STORYBOARD</functionCode>
                  <functionDescription>Allows users to view, create, edit or delete Storyboards.</functionDescription>
                  <functionName>Storyboard</functionName>
               </functions>
               <functions>
                  <accessLevelCode>R</accessLevelCode>
                  <functionCode>DASHPUBLIC</functionCode>
                  <functionDescription>Allows users to create and edit Public dashboards.</functionDescription>
                  <functionName>Public Dashboards</functionName>
               </functions>
               <functions>
                  <accessLevelCode>CRUD</accessLevelCode>
                  <functionCode>TASKPERSONAL</functionCode>
                  <functionDescription>Allow users to create and assign tasks to themselves.</functionDescription>
                  <functionName>Personal Tasks</functionName>
               </functions>
               .
               .
               .
               <roleCode>YFADMIN</roleCode>
               <roleDescription>This user has the widest range of access to the system, and as such you should have a very limited number of people assigned this role. They can do everything from create content through to managing system tasks.</roleDescription>
               <roleName>System Administrator</roleName>
            </roles>
            <sessionId>4f86f0e30e30bf4b07dea21267de0a74</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>

 

手順

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

Expand
title詳細手順
  • 以下は、こちらの関数の基礎的なリクエストです。

    Code Block
    themeEclipse
    languagejava
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
     
    rsr.setFunction("LISTROLES");
  • リクエストを構成したら、呼び出しを実行します。

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

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

 

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

    応答要素データ型説明

    StatusCode

    String

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

    • SUCCESS
    • FAILURE
    RolesAdministrationRole[]

    ロールの一覧です。

 

完成例

以下は、LISTROLES関数の完成例です。こちらを使用するには、以下の手順に従います。

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

 

Code Block
themeEclipse
languagejava
<%           
/*              ws_listroles.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("LISTROLES");
 
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
 
if ("SUCCESS".equals(rs.getStatusCode()) ) {
    out.write("Success.<br>Available Roles:");
    AdministrationRole[] roles = rs.getRoles();
    for (AdministrationRole role: roles){
        out.write("<br>");
        out.write("<br>Role Name: " + role.getRoleName());
        out.write("<br>Role Code: " + role.getRoleCode());
        out.write("<br>Role Description: " + role.getRoleDescription());
                                   
        // uncomment to display all the security functions:
        /*
        out.write("<br>Function Name | Code | Description | TypeCode | AccessLevelCode");
        for (AdministrationFunction f: role.getFunctions()){
            out.write("<br>"    + f.getFunctionName() + " | "
                                + f.getFunctionCode() + " | "
                                + f.getFunctionDescription() + " | "
                                + f.getFunctionTypeCode() + " | "
                                + f.getAccessLevelCode());
        }
        */
 
    }
} else {
    out.write("Failure");
    out.write(" Code: " + rs.getErrorCode());
}
%>
Expand
titleSAVEROLE

こちらの関数は、新規ロールを作成し、ロール機能を更新します。リクエストは、ロールの詳細を指定するAdministrationRoleオブジェクトと、ロールのAdministrationFunctionの配列を含まなくてはいけません。こちらの関数を、ロールの更新、または新規ロール作成のいずれに使用するかに関わらず、すべてのYellowfinロールは、必須関数であるレポートアクセス(コード:MIREPORT)を要求することに注意してください。MIREPORTには、アクセスレベルコードとして、最低でもR(読み取り)を設定しなくてはいけません。こちらの関数が呼び出される度に、セキュリティ機能は上書きされます。

 

リクエスト要素

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

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

LoginId

String

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

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

Password

String

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

OrgId

Integer

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

Function

String

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

Role

AdministrationRole

追加、または更新されるロールの詳細を含むオブジェクトです。詳細は、以下のを参照してください。

 

Anchor
以下の表
以下の表
以下は、こちらの関数のAdministrationRoleオブジェクトに設定しなくてはいけない主要なパラメーターです。

AdministrationRole 要素データ型説明

RoleCode

String

既存のロールの内部コードを指定します。既存のロールを更新したい場合は、こちらのパラメーターを必ず含めなくてはいけません。こちらを指定しない場合は、既に同名のロールが存在していても、新規ロールとして作成されます。

RoleName

String新規、または既存のロールの名前です。こちらは、既存のロールの変更時にも必須です。こちらを設定しない場合、呼び出しはロール名を空白にします。

RoleDescription

String

ロールの説明です。

Functions

AdministrationFunction

セキュリティ機能の一覧を含むオブジェクトです。これらは、SAVEROLE関数を呼び出す度に上書きされます。レポートアクセス関数は必須です。より詳細な情報は、以下のを参照してください。

 

Anchor
以下の表2
以下の表2
以下は、こちらのwebサービスのAdministrationFunctionオブジェクトに設定しなくてはいけない主要なパラメーターです。

AdministrationFunction要素データ型説明

FunctionCode

String

セキュリティ機能のコードを指定します。例えば、レポートアクセス関数を含める場合は、MIREPORTと設定します。

AccessLevelCode

String関数のアクセスレベルです。例えば、Rは読み取りを意味します。


以下のSOAPの例は、この呼び出しに渡すことのできるパラメーターを表示しています。

Code Block
themeEclipse
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>SAVEROLE</function>
            <role>
                <roleCode>REPORTWRITER</roleCode>
                <roleName>Report Content Writer</roleName>
                <roleDescription>This role can generate reports.</roleDescription>
                <functions>
                    <functionCode>MIREPORT</functionCode>
                    <accessLevelCode>R</accessLevelCode>
                </functions>
            </role>                          
         </arg0>
      </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>


応答要素

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

応答要素データ型説明

StatusCode

String

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

  • SUCCESS
  • FAILURE

 

サービスは、今回の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>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <roles>
               <functions>
                  <accessLevelCode>R</accessLevelCode>
                  <functionCode>MIREPORT</functionCode>
               </functions>
               <roleCode>REPORTCONTENTWRITER</roleCode>
               <roleDescription>This role can generate reports.</roleDescription>
               <roleName>Report Content Writer</roleName>
            </roles>
            <sessionId>ceaa85d0ca1eb6057dc4facb0a7a5aa9</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>

 

手順

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

Expand
title詳細手順
  • 以下は、こちらの関数の基礎的なリクエストです。

    Code Block
    themeEclipse
    languagejava
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
     
    rsr.setFunction("SAVEROLE");
  • ロールを定義します。

    Code Block
    themeEclipse
    languagejava
    AdministrationRole role = new AdministrationRole();
  • 既存のロールを変更する場合は、ロールコードが必須になります。

    Code Block
    themeEclipse
    languagejava
    role.setRoleCode("NEWROLE");          // If you want to create a new role, comment this out.

    ロールコードを指定しない場合は、同名のロールが既に存在していても、新規ロールとして作成されます。

     

    Tip

    YellowfinデータベースのOrgRoleテーブルから、ロールコードを取得することができます。(通常これはロール名に基づき、すべて大文字のスペースなしで表現されます。)

  • 既存のロールを変更する場合でもロール名は必須です。ロール名を指定しない場合、呼び出しはこれを空白にします。

    Code Block
    themeEclipse
    languagejava
    role.setRoleName("New Role");
    role.setRoleDescription("testing");
  • SAVEROLE関数の呼び出す度に、セキュリティ機能の一覧を提供しなくてはいけません。この呼び出しは、ロール機能を上書きます。例えば、2つの機能をロールに割り当てます。レポートアクセス(必須)、アクティビティストリーム(オプション)

     

    Code Block
    themeEclipse
    languagejava
    AdministrationFunction[] f = new AdministrationFunction[1];
    f[0] = new AdministrationFunction();
    f[0].setFunctionCode("MIREPORT");
    f[0].setAccessLevelCode("R");
    f[1] = new AdministrationFunction();
    f[1].setFunctionCode("ACTIVITYSTREAM");
    f[1].setAccessLevelCode("CRUD");
    Note

    セキュリティ機能を省略できないため、その場合呼び出しはエラーを生成します。

  • ロールにセキュリティ機能を割り当てます。

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

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

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

 

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

    応答要素データ型説明

    StatusCode

    String

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

    • SUCCESS
    • FAILURE

 

完成例

以下は、SAVEROLE関数の完成例です。こちらを使用するには、以下の手順に従います。

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

 

Code Block
themeEclipse
languagejava
<%           
/*              ws_saverole.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 web services admin account
rsr.setPassword("test");                           // change to the password of the account above
rsr.setOrgId(1);
 
rsr.setFunction("SAVEROLE");
 
//define a role:
AdministrationRole role = new AdministrationRole();
role.setRoleCode("NEWROLE");
role.setRoleName("New Role");
role.setRoleDescription("testing");
 
AdministrationFunction[] f = new AdministrationFunction[2];
 
f[0] = new AdministrationFunction();
f[0].setFunctionCode("MIREPORT");           // mandatory
f[0].setAccessLevelCode("R");
 
f[1] = new AdministrationFunction();
f[1].setFunctionCode("ACTIVITYSTREAM");              
f[1].setAccessLevelCode("CRUD");
 
 
//Feed the security functions to the role:
role.setFunctions(f);
 
rsr.setRole(role);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
 
 
if ("SUCCESS".equals(rs.getStatusCode()) ) {
    out.write("Success");
} else {
    out.write("Failure");
    out.write(" Code: " + rs.getErrorCode());
}
%>               
Expand
titleDELETEROLE

こちらの関数は、指定したユーザーロールを削除します。AdministrationRoleオブジェクトのロールコードを提供することで、対象のロールを識別することができます。

 

リクエスト要素

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

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

LoginId

String

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

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

Password

String

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

OrgId

Integer

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

Function

String

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

Role

AdministrationRole

削除するロールの詳細を含むオブジェクトです。以下のを参照してください。

 

Anchor
以下の表3
以下の表3
以下は、AdministrationRoleオブジェクトに設定しなくてはいけない主要なパラメーターです。

AdministrationRole 要素データ型説明

RoleCode

String

削除する既存のロールの内部コードを指定します。

 

以下のSOAPの例は、この呼び出しに渡すことのできるパラメーターを表示しています。

Code Block
themeEclipse
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>DELETEROLE</function>
            <role>
                <roleCode>REPORTWRITER</roleCode>
            </role>                          
         </arg0>
      </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>

 

応答要素

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

応答要素データ型説明

StatusCode

String

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

  • SUCCESS
  • FAILURE

 

サービスは、今回の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>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <roles>
               <roleCode>REPORTWRITER</roleCode>
            </roles>
            <sessionId>6c494a263bb684c1082317d0e1d695eb</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>

 

手順

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

Expand
title詳細手順
  • 以下は、こちらの関数の基礎的なリクエストです。

    Code Block
    themeEclipse
    languagejava
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
     
    rsr.setFunction("DELETEROLE");
  • 削除するロールを定義します。

    Code Block
    themeEclipse
    languagejava
    AdministrationRole role = new AdministrationRole();
    role.setRoleCode("NEWROLE");                     // existing role. Role Codes can be found by calling LISTROLES
                                                     // or retrieved from the Yellowfin database table OrgRole.
    rsr.setRole(role);
  • リクエストを構成したら、呼び出しを実行します。

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

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

 

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

    応答要素データ型説明

    StatusCode

    String

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

    • SUCCESS
    • FAILURE

 

完成例

以下は、DELETEROLE関数の完成例です。こちらを使用するには、以下の手順に従います。

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

    Code Block
    themeEclipse
    languagejava
    <%           
    /*              ws_deleterole.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 the password of the above account above
    rsr.setOrgId(1);
     
     
    rsr.setFunction("DELETEROLE");
     
     
    AdministrationRole role = new AdministrationRole();
    role.setRoleCode("NEWROLE");
    rsr.setRole(role);
     
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
     
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
        out.write("Success");
    } else {
        out.write("Failure");
        out.write(" Code: " + rs.getErrorCode());
    }
    %>

...