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.

...

Expand
titleSAVEROLE

This function creates a new role and/or updates a role's functions. The request must contain an AdministrationRole object to specify the role details, and an array of AdministrationFunction for the role. Whether this function is used to update a role, or create a new one, it should be noted that every Yellowfin role requires a mandatory function, Report Access (function code: MIREPORT). MIREPORT access level code must be at least R (read). Each time this function is called, the security functions will be overwritten.

 

Request Elements

The following elements will be passed with this request:

Request Element

Data Type

Description

LoginId

String

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

This Yellowfin 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 services function. Set this to "SAVEROLE".

RoleAdministrationRoleThis object contains details of the role to be added/updated. See table below.

Anchor
saveroleap
saveroleap
 

These are the main parameters that you need to set in the AdministrationRole object to create a new Yellowfin role:

AdministrationRole Element

Data Type

Description

RoleCodeStringTo specify the name internal code of an existing role. This parameter must be included if you want to update a role that already exists. If unspecified, a new role will be created, even if one with the same name already exists.
RoleNameStringName of the new or existing role. This is also
   
   

 

 

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
 

 

Response Elements

The response returned will contain these parameters:

mandatory even when modifying an existing role, otherwise the call will set the role name to blank.
RoleDescriptionStringDescription of the role.
FunctionsAdministrationFunctionThis object contains a list of security functions. These will be overwritten every time the Save Role function is called. The function Report Access is mandatory. See table below for more details.

Anchor
saveroleaf
saveroleaf

These are the main parameters that you need to set in the AdministrationFunction object:

AdministrationFunction Response Element

Data Type

Description

StatusCodeFunctionCodeString

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE

 

 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
To specify the code of a security function. For example, to include the function Report Access, specify it with its code MIREPORT.
AccessLevelCodeStringThe access level of the function. For example, R means read.

 

 

The following SOAP example shows the parameters that you can pass to this call

Displayed below is a basic request for this function

:

java

Then define a role:

Code Block
language
xml
AdministrationServiceRequest rsr = new AdministrationServiceRequest();

rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);

rsr.setFunction("SAVEROLE");
Code Block
languagejava
AdministrationRole role = new AdministrationRole();
  • Role Code is mandatory if you want to modify an existing role:

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

    If you do not specify the Role Code, the call will create a new role even if another role with the same name already exists.

     

    Tip

    You can get the role codes from Yellowfin's database OrgRole table. (Usually, it is based on role name with all letters capitalized and with no space between them.)

     

     

  • Role Name is mandatory even when modifying an existing role, otherwise the call will set the role name to blank:

    Code Block
    languagejava
    role.setRoleName("New Role");
    role.setRoleDescription("testing");
    

    Each time you call the SAVEROLE function, you need to provide a list of security functions. This call overwrites the role function. For instance, 2 functions will be assigned to the role: Report Access (mandatory) and Activity Stream (optional):

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

    You cannot omit security functions; the call will generate an error otherwise. Click here for all available security function options.

    Then feed the security functions to the role:

    Code Block
    languagejava
    role.setFunctions(f);
    rsr.setRole(role);
    
    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 returned will contain
     <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>

     

    Response Elements

    The response returned will contain these parameters:

    Response Element

    Data Type

    Description

    StatusCode

    String

    Status of the web service call. Possible values include:

    • SUCCESS
    • FAILURE

     

     

    Complete Example

    Below is a full example of the SAVEROLE function. To use it for yourself, carry out the following the steps:

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

     

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

    Code Block
    languagexml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
    
    Code Block
    languagejava
    <%            <errorCode>0</errorCode>
    /*            <messages>Successfully  ws_saverole.jspAuthenticated User: admin@yellowfin.com.au</messages>
                <messages>Web Service Request *Complete</messages>
    %>
    <%@  page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %> <roles>
    <%@     page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <% 
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); <functions>
              // adjust host and port number
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au"); <accessLevelCode>R</accessLevelCode>
                  // provide your Yellowfin web<functionCode>MIREPORT</functionCode>
     services admin account
    rsr.setPassword("test");            </functions>
                   <roleCode>REPORTCONTENTWRITER<//roleCode>
     change to      the password of the account above
    rsr.setOrgId(1);
    
    rsr.setFunction("SAVEROLE");
    
    //define a role:
    AdministrationRole<roleDescription>This role =can 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");generate reports.</roleDescription>
                   <roleName>Report Content Writer</roleName>
                // mandatory
    f[0].setAccessLevelCode("R");
    
    f[1] = new AdministrationFunction();
    f[1].setFunctionCode("ACTIVITYSTREAM");</roles>
                <sessionId>ceaa85d0ca1eb6057dc4facb0a7a5aa9</sessionId>
                <statusCode>SUCCESS</statusCode>
        
    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());
    }
    %>
    
    
     </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:

    ...

    This function deletes a user role, which is specified using the AdministrationRole object, by providing the Role Code.

     
    Expand
    title
    DELETEROLE
    Step-by-step instructions
    • Displayed below is a basic request for this function:

      Code Block
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
      
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
      
      rsr.setFunction("
    DELETEROLE
    • SAVEROLE");
    Define the role that needs to be deleted


    • Then define a role:

      Code Block
      languagejava
      AdministrationRole role = new AdministrationRole();
      



    • Role Code is mandatory if you want to modify an existing role:

      Code Block
      languagejava
      role.setRoleCode("NEWROLE");			// If you want to create a new role, comment 
    // existing role. Role Codes can be found by calling LISTROLES // or retrieved from the Yellowfin database table OrgRole. rsr.setRole(role);

     

    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 returned will contain these parameters:

    Response Element

    Data Type

    Description

    StatusCode

    String

    Status of the web service call. Possible values include:

    • SUCCESS
    • FAILURE
    • this out.

      If you do not specify the Role Code, the call will create a new role even if another role with the same name already exists.

       

      Tip

      You can get the role codes from Yellowfin's database OrgRole table. (Usually, it is based on role name with all letters capitalized and with no space between them.)

       

       

    • Role Name is mandatory even when modifying an existing role, otherwise the call will set the role name to blank:

      Code Block
      languagejava
      role.setRoleName("New Role");
      role.setRoleDescription("testing");
      



    • Each time you call the SAVEROLE function, you need to provide a list of security functions. This call overwrites the role function. For instance, 2 functions will be assigned to the role: Report Access (mandatory) and Activity Stream (optional):

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

      You cannot omit security functions; the call will generate an error otherwise.



    • Then feed the security functions to the role:

      Code Block
      languagejava
      role.setFunctions(f);
      rsr.setRole(role);
      



    • 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 returned will contain these parameters:

      Response Element

      Data Type

      Description

      StatusCode

      String

      Status of the web service call. Possible values include:

      • SUCCESS
      • FAILURE

     

     

    Complete Example

    Below is a full example of the SAVEROLE function. To use it for yourself, carry out the following the steps:

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

     

    Code Block
    languagejava
    <%

    Complete Example

    Below is a full example of the DELETEROLE function. To use it for yourself, carry out the following the steps:

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

     

    Code Block
    languagejava
    <%            
    /*              ws_deleterole.jsp               
    /*              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 webservicesweb services admin account
    rsr.setPassword("test");                           // change to the password of the above account above
    rsr.setOrgId(1);
    
    
    rsr.setFunction("DELETEROLESAVEROLE");
    
    //define a role:
    AdministrationRole role = new AdministrationRole();
    role.setRoleCode("NEWROLE");
    rsrrole.setRole(rolesetRoleName("New Role");
    role.setRoleDescription("testing");
    
    AdministrationServiceResponseAdministrationFunction[] rsf = adminService.remoteAdministrationCall(rsr) new AdministrationFunction[2];
    
    
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
    	out.write("Success");
    } else {
    	out.write("Failure");
    	out.write(" Code: " + rs.getErrorCode());
    }
    %>
    
    
    

     

     

    ...

    AdministrationServiceRequest rsr = new AdministrationServiceRequest(
    Expand
    titleLISTGROUPS

    The LISTGROUPS function returns all the groups available in Yellowfin. The response contains an array of AdministrationGroup objects representing available groups. For a list of groups belonging to a specific client, you can pass the Client Org reference ID in the call. 

     

    Displayed below is a basic request for this function:
    Code Block
    languagejava
    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.
    setLoginId("admin@yellowfin.com.au"
    setRole(role);
    
    rsr.setPassword("test"
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
    
    rsr.setOrgId(1);
    
    
    
    rsr.setFunction
    if ("
    LISTGROUPS");

    Include a Client Org ID to list groups specific to that client. (If not included, then the default (that is, the Primary Org) groups will be displayed).

    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 returned will contain these parameters:

    Response Element

    Data Type

    Description

    StatusCode

    String

    Status of the web service call. Possible values include:

    • SUCCESS
    • FAILURE

    Groups

    AdministrationGroup[]

    List of groups

    SUCCESS".equals(rs.getStatusCode()) ) {
    	out.write("Success");
    } else {
    	out.write("Failure");
    	out.write(" Code: " + rs.getErrorCode());
    }
    %>
    
    
    

     

     

    Anchor
    deleterole
    deleterole

    Expand
    titleDELETEROLE

    This function deletes a user role, which is specified using the AdministrationRole object, by providing the Role Code.

     

    Request Elements

    The following elements will be passed with this request:

    Request Element

    Data Type

    Description

    LoginId

    String

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

    This Yellowfin 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 services function. Set this to "SAVEROLE".

    RoleAdministrationRoleThis object contains details of the role to be added/updated. See table below.

    Anchor
    saveroleap
    saveroleap

    These are the main parameters that you need to set in the AdministrationRole object to create a new Yellowfin role:

    AdministrationRole Element

    Data Type

    Description

    RoleCodeStringTo specify the internal code of an existing role. This parameter must be included if you want to update a role that already exists. If unspecified, a new role will be created, even if one with the same name already exists.
    RoleNameStringName of the new or existing role. This is mandatory even when modifying an existing role, otherwise the call will set the role name to blank.
    RoleDescriptionStringDescription of the role.
    FunctionsAdministrationFunctionThis object contains a list of security functions. These will be overwritten every time the Save Role function is called. The function Report Access is mandatory. See table below for more details.

    Anchor
    saveroleaf
    saveroleaf

    These are the main parameters that you need to set in the AdministrationFunction object:

    AdministrationFunction Element

    Data Type

    Description

    FunctionCodeStringTo specify the code of a security function. For example, to include the function Report Access, specify it with its code MIREPORT.
    AccessLevelCodeStringThe access level of the function. For example, R means read.

     

     

    The following SOAP example shows the parameters that you can pass to this call:

     

    Response Elements

    The response returned will contain these parameters:

    Response Element

    Data Type

    Description

    StatusCode

    String

    Status of the web service call. Possible values include:

    • SUCCESS
    • FAILURE

     

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

     

     

    Instructions

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

    Expand
    titleStep-by-step instructions
     

     

     

    • Displayed below is a basic request for this function:

      Code Block
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
      
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
      
      rsr.setFunction("DELETEROLE");



    • Define the role that needs to be deleted:

      Code Block
      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);
      

     

    • 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 returned will contain these parameters:

      Response Element

      Data Type

      Description

      StatusCode

      String

      Status of the web service call. Possible values include:

      • SUCCESS
      • FAILURE

    Complete Example

    Below is a full example of the DELETEROLE function. To use it for yourself, carry out the following the steps:

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

     

    Code Block
    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());
    }
    %>
    
    
    

     

     

    Anchor
    listgroups
    listgroups

    Expand
    titleLISTGROUPS

    The LISTGROUPS function returns all the groups available in Yellowfin. The response contains an array of AdministrationGroup objects representing available groups. For a list of groups belonging to a specific client, you can pass the Client Org reference ID in the call. 

     

    Request Elements

    The following elements will be passed with this request:

    Request Element

    Data Type

    Description

    LoginId

    String

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

    This Yellowfin 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 services function. Set this to "SAVEROLE".

    RoleAdministrationRoleThis object contains details of the role to be added/updated. See table below.

    Anchor
    saveroleap
    saveroleap

    These are the main parameters that you need to set in the AdministrationRole object to create a new Yellowfin role:

    AdministrationRole Element

    Data Type

    Description

    RoleCodeStringTo specify the internal code of an existing role. This parameter must be included if you want to update a role that already exists. If unspecified, a new role will be created, even if one with the same name already exists.
    RoleNameStringName of the new or existing role. This is mandatory even when modifying an existing role, otherwise the call will set the role name to blank.
    RoleDescriptionStringDescription of the role.
    FunctionsAdministrationFunctionThis object contains a list of security functions. These will be overwritten every time the Save Role function is called. The function Report Access is mandatory. See table below for more details.

    Anchor
    saveroleaf
    saveroleaf

    These are the main parameters that you need to set in the AdministrationFunction object:

    AdministrationFunction Element

    Data Type

    Description

    FunctionCodeStringTo specify the code of a security function. For example, to include the function Report Access, specify it with its code MIREPORT.
    AccessLevelCodeStringThe access level of the function. For example, R means read.

     

     

    The following SOAP example shows the parameters that you can pass to this call:

     

    Response Elements

    The response returned will contain these parameters:

    Response Element

    Data Type

    Description

    StatusCode

    String

    Status of the web service call. Possible values include:

    • SUCCESS
    • FAILURE

     

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

     

     

    Instructions

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

    Expand
    titleStep-by-step instructions
     

     

     

     

    • Displayed below is a basic request for this function:

      Code Block
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
      
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
      
      rsr.setFunction("LISTGROUPS");



    • Include a Client Org ID to list groups specific to that client. (If not included, then the default (that is, the Primary Org) groups will be displayed).

      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 returned will contain these parameters:

      Response Element

      Data Type

      Description

      StatusCode

      String

      Status of the web service call. Possible values include:

      • SUCCESS
      • FAILURE

      Groups

      AdministrationGroup[]

      List of groups

    • You can retrieve members of each group by using AdministrationGroup.getGroupMembers(). This will retrieve an array of AdministrationGroupMember. Keep in mind that if the group has a user role as a member, it will not be retrieved. Only user accounts will be retrieved via getGroupMembers().

     

    Complete Example

    Below is a full example of the LISTGROUPS function. To use it for yourself, carry out the following the steps:

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

     

    Code Block
    languagejava
    <%            
    /*              ws_listgroups.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 above account
    rsr.setOrgId(1);
    
    rsr.setFunction("LISTGROUPS");
    
    //rsr.setOrgRef("org1");                    	   // provide org reference if required. Default org groups will be retrieved otherwise
    
    
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
    
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
    	out.write("Success.<br>Available Groups:");
    	AdministrationGroup[] groups = rs.getGroups();
    	for (AdministrationGroup group: groups){
    		out.write("<br>");
    		out.write("<br>Group Name: " + group.getGroupName());
    		out.write("<br>Group Id: " + group.getGroupId());
    		out.write("<br>Group Description: " + group.getGroupDescription());
    		out.write("<br>Group Status: " + group.getGroupStatus());
    		out.write("<br>Group Internal Reference: " + group.getGroupInternalReference());
    
    
    		// uncomment to display the members:
    		/*
    		out.write("<br>Members:<br>Login Id | Internal Id ");
    		for (AdministrationGroupMember member: group.getGroupMembers()){
    			out.write("<br>" + member.getLoginId() + " | " + member.getInternalId() );
    		}
    		*/
    	}
    } else {
    	out.write("Failure");
    	out.write(" Code: " + rs.getErrorCode());
    }
    %>
    
    
    

     

     

    <% /* ws_listgroups.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 above account rsr.setOrgId(1); rsr.setFunction("LISTGROUPS"); //rsr.setOrgRef("org1"); // provide org reference if required. Default org groups will be retrieved otherwise
    • Once the request is configured, perform the call:

    Expand
    titleGETGROUP

    Use this function to retrieve a specified user group with its members. Group name should be provided to the request.

    Client org reference Id can be passed to manipulate with the client content otherwise default (primary) org will be searched.

     

    Request Elements

    The following elements will be passed with this request:

    Request Element

    Data Type

    Description

    LoginId

    String

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

    This Yellowfin 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 services function. Set this to "SAVEROLE".

    RoleAdministrationRoleThis object contains details of the role to be added/updated. See table below.

    Anchor
    saveroleap
    saveroleap

    These are the main parameters that you need to set in the AdministrationRole object to create a new Yellowfin role:

    AdministrationRole Element

    Data Type

    Description

    RoleCodeStringTo specify the internal code of an existing role. This parameter must be included if you want to update a role that already exists. If unspecified, a new role will be created, even if one with the same name already exists.
    RoleNameStringName of the new or existing role. This is mandatory even when modifying an existing role, otherwise the call will set the role name to blank.
    RoleDescriptionStringDescription of the role.
    FunctionsAdministrationFunctionThis object contains a list of security functions. These will be overwritten every time the Save Role function is called. The function Report Access is mandatory. See table below for more details.

    Anchor
    saveroleaf
    saveroleaf

    These are the main parameters that you need to set in the AdministrationFunction object:

    AdministrationFunction Element

    Data Type

    Description

    FunctionCodeStringTo specify the code of a security function. For example, to include the function Report Access, specify it with its code MIREPORT.
    AccessLevelCodeStringThe access level of the function. For example, R means read.

     

     

    The following SOAP example shows the parameters that you can pass to this call:

     

    Response Elements

    The response returned will contain these parameters:

    Response Element

    Data Type

    Description

    StatusCode

    String

    Status of the web service call. Possible values include:

    • SUCCESS
    • FAILURE

     

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

     

     

    Instructions

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

    Expand
    titleStep-by-step instructions
     

     

     

     

    • Displayed below is a basic request for this function:

      Code Block
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
      
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
      
      rsr.setFunction("GETGROUP");



    • Include a Client Org ID to list groups specific to that client. (If not included, then the default (that is, the Primary Org) groups will be displayed).

      Code Block
      languagejava
      rsr.setOrgRef("org1");
      



    • Provide name of a user group to retrieve its members:

      Code Block
      languagejava
      AdministrationGroup group = new AdministrationGroup();
      group.setGroupName("Administrators");
      rsr.setGroup(group);

     

  • You can retrieve members of each group by using AdministrationGroup.getGroupMembers(). This will retrieve an array of AdministrationGroupMember. Keep in mind that if the group has a user role as a member, it will not be retrieved. Only user accounts will be retrieved via getGroupMembers().

  •  

    Complete Example

    Below is a full example of the LISTGROUPS function. To use it for yourself, carry out the following the steps:

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

     

    Code Block
    languagejava
    Code Block
    languagejava
    • AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
      
    if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Success.<br>Available Groups:"); AdministrationGroup[] groups = rs.getGroups(); for (AdministrationGroup group: groups){ out.write("<br>"); out.write("<br>Group Name: " + group.getGroupName()); out.write("<br>Group Id: " + group.getGroupId()); out.write("<br>Group Description: " + group.getGroupDescription()); out.write("<br>Group Status: " + group.getGroupStatus()); out.write("<br>Group Internal Reference: " + group.getGroupInternalReference()); // uncomment to display the members: /* out.write("<br>Members:<br>Login Id | Internal Id "); for (AdministrationGroupMember member: group.getGroupMembers()){ out.write("<br>" + member.getLoginId() + " | " + member.getInternalId() ); } */ } } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %>

     

     

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

     

    • The response returned will contain these parameters:

      Response Element

      Data Type

      Description

      StatusCode

      String

      Status of the web service call. Possible values include:

      • SUCCESS
      • FAILURE

      Group

      AdministrationGroup[]

      Group with members

    • Use the following to retrieve members:

      Code Block
      languagejava
      AdministrationGroupMember[] members = rs.getGroup().getGroupMembers();
      
      Tip

      You can use AdministrationGroupMember.getInternalId() to get the IpId of the Yellowfin account. Then pass it to a GETUSERBYIP call to retrieve the AdministrationPerson object for the user.

     

    Complete Example

    Below is a full example of the GETGROUP function. To use it for yourself, carry out the following the steps:

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

     

    Code Block
    languagejava
    <%            
    /*              ws_getgroup.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("GETGROUP");
    
    //rsr.setOrgRef("org1");           

    Use this function to retrieve a specified user group with its members. Group name should be provided to the request.

    Client org reference Id can be passed to manipulate with the client content otherwise default (primary) org will be searched.

     

    Displayed below is a basic request for this function:
    Code Block
    languagejava
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    
    rsr.setFunction("GETGROUP");

    Include a Client Org ID to list groups specific to that client. (If not included, then the default (that is, the Primary Org) groups will be displayed).

    Code Block
    languagejava
    rsr.setOrgRef("org1");
    
    Provide name of a user group to retrieve its members:
    Code Block
    languagejava
    AdministrationGroup group = new AdministrationGroup();
    group.setGroupName("Administrators");
    rsr.setGroup(group);

     

    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 returned will contain these parameters:

    Response Element

    Data Type

    Description

    StatusCode

    String

    Status of the web service call. Possible values include:

    • SUCCESS
    • FAILURE

    Group

    AdministrationGroup[]

    Group with members

    Use the following to retrieve members:
    Code Block
    languagejava
    AdministrationGroupMember[] members = rs.getGroup().getGroupMembers();
    
    Tip

    You can use AdministrationGroupMember.getInternalId() to get the IpId of the Yellowfin account. Then pass it to a GETUSERBYIP call to retrieve the AdministrationPerson object for the user.

     

    Complete Example

    Below is a full example of the GETGROUP function. To use it for yourself, carry out the following the steps:

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

     

    Code Block
    languagejava
    <%         	   
    /*              ws_getgroup.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("GETGROUP");
    
    //rsr.setOrgRef("org1");                    	   // provide org reference ID if required. Default org will be searched otherwise
    
    AdministrationGroup group = new AdministrationGroup();
    group.setGroupName("Administrators");
    rsr.setGroup(group);
    
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
    
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
    	out.write("Success.<br>");
    	group = rs.getGroup();
    	
    	out.write("<br>");
    	out.write("<br>Group Name: " + group.getGroupName());
    	out.write("<br>Group Id: " + group.getGroupId());
    	out.write("<br>Group Description: " + group.getGroupDescription());
    	out.write("<br>Group Status: " + group.getGroupStatus());
    	out.write("<br>Group Internal Reference: " + group.getGroupInternalReference());
    
    
    	// display the members:
    	out.write("<br>Members:<br>Login Id | Internal Id ");
    	for (AdministrationGroupMember member: group.getGroupMembers()){
    		out.write("<br>" + member.getLoginId() + " | "  + member.getInternalId() );
    	}
    } else {
    	out.write("Failure");
    	out.write(" Code: " + rs.getErrorCode());
    }
    %>
    
    
    

     

     

    // provide org reference ID if required. Default org will be searched otherwise
    
    AdministrationGroup group = new AdministrationGroup();
    group.setGroupName("Administrators");
    rsr.setGroup(group);
    
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
    
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
    	out.write("Success.<br>");
    	group = rs.getGroup();
    	
    	out.write("<br>");
    	out.write("<br>Group Name: " + group.getGroupName());
    	out.write("<br>Group Id: " + group.getGroupId());
    	out.write("<br>Group Description: " + group.getGroupDescription());
    	out.write("<br>Group Status: " + group.getGroupStatus());
    	out.write("<br>Group Internal Reference: " + group.getGroupInternalReference());
    
    
    	// display the members:
    	out.write("<br>Members:<br>Login Id | Internal Id ");
    	for (AdministrationGroupMember member: group.getGroupMembers()){
    		out.write("<br>" + member.getLoginId() + " | "  + member.getInternalId() );
    	}
    } else {
    	out.write("Failure");
    	out.write(" Code: " + rs.getErrorCode());
    }
    %>
    
    
    

     

     

    Expand
    titleCREATEGROUP

    Creates a new user group in the client org provided. If the client reference Id is omitted, the group will be created in default (primary) org. The call requires AdministrationGroup object where you provide new group details. If you supply new group members via AdministrationGroupMember, the members will be added to the created group (this must be existing Yellowfin users).

    Client org reference Id can be passed to manipulate with the client content otherwise default (primary) org will be used.

     

    Request Elements

    The following elements will be passed with this request:

    Request Element

    Data Type

    Description

    LoginId

    String

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

    This Yellowfin 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 services function. Set this to "SAVEROLE".

    RoleAdministrationRoleThis object contains details of the role to be added/updated. See table below.

    Anchor
    saveroleap
    saveroleap

    These are the main parameters that you need to set in the AdministrationRole object to create a new Yellowfin role:

    AdministrationRole Element

    Data Type

    Description

    RoleCodeStringTo specify the internal code of an existing role. This parameter must be included if you want to update a role that already exists. If unspecified, a new role will be created, even if one with the same name already exists.
    RoleNameStringName of the new or existing role. This is mandatory even when modifying an existing role, otherwise the call will set the role name to blank.
    RoleDescriptionStringDescription of the role.
    FunctionsAdministrationFunctionThis object contains a list of security functions. These will be overwritten every time the Save Role function is called. The function Report Access is mandatory. See table below for more details.

    Anchor
    saveroleaf
    saveroleaf

    These are the main parameters that you need to set in the AdministrationFunction object:

    AdministrationFunction Element

    Data Type

    Description

    FunctionCodeStringTo specify the code of a security function. For example, to include the function Report Access, specify it with its code MIREPORT.
    AccessLevelCodeStringThe access level of the function. For example, R means read.

     

     

    The following SOAP example shows the parameters that you can pass to this call:

     

    Response Elements

    The response returned will contain these parameters:

    Response Element

    Data Type

    Description

    StatusCode

    String

    Status of the web service call. Possible values include:

    • SUCCESS
    • FAILURE

     

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

     

     

    Instructions

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

    Expand
    titleStep-by-step instructions
     

     

     

    Expand
    titleCREATEGROUP

    Creates a new user group in the client org provided. If the client reference Id is omitted, the group will be created in default (primary) org. The call requires AdministrationGroup object where you provide new group details. If you supply new group members via AdministrationGroupMember, the members will be added to the created group (this must be existing Yellowfin users).

    Client org reference Id can be passed to manipulate with the client content otherwise default (primary) org will be used.

     

    • Displayed below is a basic request for this function:

      Code Block
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
      
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
      
      rsr.setFunction("CREATEGROUP");



    • To add the new group to a specific client, include its Client Org ID. (If not included, then the group will be created in the default (that is, the Primary Org) group).

      Code Block
      languagejava
      rsr.setOrgRef("org1");
      



    • Set parameters for the new group:

      Code Block
      languagejava
      AdministrationGroup group = new AdministrationGroup();
      group.setGroupName("Test Group");
      
    • Inclue members to the group, for example:

      Code Block
      languagejava
      AdministrationGroupMember[] member = new AdministrationGroupMember[2];
      
      member[0] = new AdministrationGroupMember();
      member[0].setLoginId("admin@yellowfin.com.au");
      
      member[1] = new AdministrationGroupMember();
      member[1].setLoginId("john.smith@yellowfin.com.au");
      
      group.setGroupMembers(member);
      
      rsr.setGroup(group);

     

    • 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 returned will contain these parameters:

      Response Element

      Data Type

      Description

      StatusCode

      String

      Status of the web service call. Possible values include:

      • SUCCESS
      • FAILURE

    Complete Example

    Below is a full example of the CREATEGROUP function. To use it for yourself, carry out the following the steps:

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

     

    Code Block
    languagejava
    <%            
    /*              ws_creategroup.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);
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    
    rsr.setFunction("CREATEGROUP");
    
    //Specify client org (if omitted, the group will be created in the default (primary) org):
    rsr.setOrgRef("org1");
    
    //Set parameters of the new group:
    AdministrationGroup group = new AdministrationGroup();
    group.setGroupName("Test Group");                          // mandatory. Other parameters are optional.
    
    //Add members:
    AdministrationGroupMember[] member = new AdministrationGroupMember[2];
    member[0] = new AdministrationGroupMember();
    member[0].setLoginId("admin@yellowfin.com.au");
    
    member[1] = new AdministrationGroupMember();
    member[1].setLoginId("john.smith@yellowfin.com.au");
    
    group.setGroupMembers(member);
    
    rsr.setGroup(group);
    
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
    
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
    	out.write("Success");
    } else {
    	out.write("Failure");
    	out.write(" Code: " + rs.getErrorCode() );
    }
    %>