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.

...

Retrieving Report Objects

 

 

Expand
titleGETUSERREPORT

This web service call is used to remove a specified user's access to a client organization. The user and the client org can be identified using the AdministrationPerson and AdministrationClientOrg objects, respectively.

This removed user account will remain in the system, even if that user doesn't belong to any other client organizations. To delete that user account from the system, you can use the DELETEUSER call. Or you could even add that user to the default organization by using the ADDUSERACCESS call.

 

Request Parameters

The following parameters should be passed with this request:

Request Element

Data Type

Description

LoginId

String

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

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

Password

String

Password of the above account.

OrgId

Integer

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

Function

String

Web service function. Set this to "REMOVEUSERACCESS".

PersonAdministrationPersonObject containing details of the user. See table below.
ClientAdministrationClientOrgObject containing details of the client org. See table below.

 

Anchor
remuserap
remuserap

These are the main parameters that you must set in the AdministrationPerson object for this web service call:

AdministrationPerson Element

Data Type

Description

UserID

String

To identify the user whose access is to be removed from the client org. This could be the user ID or email address, depending on the Logon ID method.

 

Anchor
remuserco
remuserco

These are the main parameters that you must set in the AdministrationClientOrg object for this web service call:

AdministrationClientOrg Element

Data Type

Description

ClientReferenceID

String

To identify an existing client organization to remove the user from.

 

Request Example

Below is a SOAP XML example for this request:

 

 

Response Parameters

The returned response will contain these parameters:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE

 

Response Example

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

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <sessionId>a30aafab603330389d2bfb5a3e0faae7</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>

 

 

Instructions

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

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

    Code Block
    languagejava
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    
    rsr.setFunction("REMOVEUSERACCESS");
  • Define the user that is to be removed from the client org:

    Code Block
    languagejava
    AdministrationPerson ap = new AdministrationPerson();
    ap.setUserId("admin@yellowfin.com.au");
    
    rsr.setPerson(ap);
    
  • Then specify which the client organization:

    Code Block
    languagexml
    AdministrationClientOrg ac = new AdministrationClientOrg();
    ac.setClientReferenceId("org3");                  // must be an existing client org
    
    rsr.setClient(ac);
    

 

  • 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 this web service call. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_ removeuseraccess.jsp.
  2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
  3. Adjust the host, port, admin user, user whose access is to be removed and the client org. reference ID according to your environment.
  4. Run http://<host>:<port>/ws_ removeuseraccess.jsp from your Internet browser.

 

Code Block
languagexml
themeEclipse
<%            
/*              ws_removeuseraccess.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");                           // set to the password of the above account
rsr.setOrgId(1);

rsr.setFunction("REMOVEUSERACCESS");
AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("admin@yellowfin.com.au");  			

rsr.setPerson(ap);
AdministrationClientOrg ac = new AdministrationClientOrg();
ac.setClientReferenceId("org3");                  // must be an existing client org

rsr.setClient(ac);

AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

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