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
titleGETUSERREPORT

Retrieves report metadata for a specified report ID. Requires user Id , and a report Id. User Id should be passed via user who requires it. The user can be identified using the AdministrationPerson object.

Keep in mind that each time when you edit a report, Yellowfin changes the report Id ID whereas the report UUID is always the same for the report. You can do use the GETIDFORUUID call to find out what id ID corresponds to the report UUID at that moment.

 

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

PersonAdministrationPersonObject containing details of the user. See table below.
OrgRefStringClient organization reference ID. This parameter is not mandatory.
ReportIdIntegerThe unique ID of the report which you want details of. This report should already exist in Yellowfin.

 

Anchor
getuserap
getuserap

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

AdministrationPerson Element

Data Type

Description

UserIDUserId

String

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

 

 

Request Example

Below is a SOAP XML example for this request:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteAdministrationCall>
         <arg0>
 		  <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <function>GETUSERREPORT</function>
            <reportId>56401</reportId>       
            <person>
                <userId>admin@yellowfin.com.au</userId>              
            </person>       
         </arg0>
      </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Parameters

The returned response will contain these parameters:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE

Person

AdministrationPerson

Full details of the user.

Reports

AdministrationReport[]

An array that contains details of the specified report.

 

Response Example

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

Code Block
languagexmljava
<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>Getting user information...</messages>
            <messages>Getting user information...</messages>
            <messages>Web Service Request Complete</messages>
            <person>
               <emailAddress>admin@yellowfin.com.au</emailAddress>
               <firstName>System</firstName>
               <initial/>
               <ipId>5</ipId>
               <languageCode>EN</languageCode>
               <lastName>Administrator</lastName>
               <roleCode>YFADMIN</roleCode>
               <salutationCode/>
               <status>ACTIVE</status>
               <timeZoneCode>AUSTRALIA/SYDNEY</timeZoneCode>
               <userId>admin@yellowfin.com.au</userId>
            </person>
            <reports>
               <authoringMode>JAVA</authoringMode>
               <averageRunTime>0</averageRunTime>
               <birtData/>
               <chartTypeCode/>
               <dashboardEnabled>true</dashboardEnabled>
               <dataOutput>COLUMN</dataOutput>
               <deliveryMode/>
               <executionObject/>
               <lastModifiedDate>2016-03-29T00:00:00+11:00</lastModifiedDate>
               <lastModifierId>5</lastModifierId>
               <lastModifierName>System Administrator</lastModifierName>
               <publishDate>2016-03-23T00:00:00+11:00</publishDate>
               <reportCategory>Audit Reports</reportCategory>
               <reportDescription/>
               <reportId>56401</reportId>
               <reportName>Active Sessions</reportName>
               <reportSubCategory>Admin Reports</reportSubCategory>
            <sessionId>a30aafab603330389d2bfb5a3e0faae7<   <reportTemplate>REPORTANDCHART</reportTemplate>
               <reportUUID>594d4da4-1b58-44d3-bf4f-11456a42f68c</reportUUID>
               <roleCode>OPERATIONAL</roleCode>
               <sourceName/>
               <usage>4</usage>
               <viewDescription>Yellowfin Usage Audit</viewDescription>
               <viewId>56169</viewId>
               <viewName>NEW VIEW</viewName>
            </reports>
            <sessionId>3a4f9969aa278c03fa4cb891a87d6f36</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("REMOVEUSERACCESSGETUSERREPORT");
  • Define Specify the user that is to be removed from the client orgfor whom to retrieve the report:

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

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

 

  • java
    rsr.setOrgRef("org1");
    
  • Provide the report ID. Ensure this ID belongs to an existing report.

    Code Block
    languagejava
    rsr.setReportId(70292); 
  • 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

    Person

    AdministrationPerson

    Full details of the user.

    Reports

    AdministrationReport[]

    An array that contains details of the specified report.

  • You can then retrieve the report:

    Code Block
    languagejava
    AdministrationReport[] rpts = rs.getReports();
    AdministrationReport report = rpts[0]; 			// getting the metadata of the first report
    

 

 

 

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_ removeuseraccessgetuserreport.jsp.
  2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
  3. Adjust the host, port, and 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 getuserreport.jsp from your Internet browser.

 

Code Block
languagexml
themeEclipse
<%            
/*              ws_removeuseraccessgetuserreport.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("REMOVEUSERACCESSGETUSERREPORT");
rsr.setOrgRef("org1");
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);
 
rsr.setReportId(70297);								//existing report id. ReportId field of ReportHeader table (Yellowifn database)


AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

if ("SUCCESS".equals(rs.getStatusCode()) ) {
	out.write("Success");       "Success<br>");

	// get the report details:
	AdministrationReport[] rpts = rs.getReports();
	for (AdministrationReport r: rpts){
		out.write("<br>Report Name: " + r.getReportName());
		out.write("<br>Description: " + r.getReportDescription());
		out.write("<br>Category: " + r.getReportCategory());
		out.write("<br>Subcategory: " + r.getReportSubCategory());
	}
} else {
	out.write("Failure");
	out.write(" Code: " + rs.getErrorCode());
}
%>