2 Discoverer Web Services API Reference

This chapter provides detailed reference information for the following Discoverer Web Services API.

2.1 AppsConnect

This API is used to establish a secure connection to Discoverer Web Services for Oracle E-Business Suite (EBS) users.

This API call accepts the APP_SECURE ticket, Connection string, name of the EUL, and LocaleBean information and returns a unique SessionKey, which is then passed to all other API calls.

API Details
Method
Public SessionKey AppsConnect(ticket,ConnectStr,eul,locale) { }
Input:
  • ticket

    This object must contain a valid APP_SECURE ticket for the Discoverer application.

  • ConnectStr

    This object passes the connection details to connect to Discoverer.

  • eul

    Specifies the name of the database schema which contains the EUL that the user want to connect to.

  • locale

    This object passes locale information to the webservice session. By default the Locale is English (en-US).

Output
  • SessionKey
Exceptions
  • DiscovererWSException
  • DiscovererSessionUnavailableException


The following table lists the fields of the structures.

Structure Fields
Ticket
  • String ticket_name
ConnectString
  • String name
DiscoEulName
  • String eulname
LocaleBean
  • String language
  • String country

  • String variant


2.2 getConnectionList

This API call obtains a list of connections. It accepts SessionKey and returns the Connection list object. In single sign-on mode the list of public connections and private connections is returned. The connection can be of type Relational, OLAP, or APPS.

API Details
Method
Public ConnectionList getConnectionList(SessionKey aSessionKey) { }
Input:
  • SessionKey
Output
  • ConnectionList
Exceptions
  • java.rmi.RemoteException

The following table lists the fields of the structures.

Structure Fields
ConnectionList
  • Array of Connection objects
Connection
  • ConnectionName
  • ConnectionKey

  • ConnectionDescription

  • ConnectionEUL

  • ConnectionDBIdentifier

  • ConnectionAccessType

ConnectionName
  • String name
ConnectionKey
  • String key
ConnectionDescription
  • String description
ConnectionEUL
  • String eulname
ConnectionDBIdentifier
  • String database name
ConnectionAccessType
  • String accesstype

2.3 getFolderEntryList

This API call uses a connection to obtain the list of non-scheduled workbooks and FolderEntries. It accepts SessionKey, ConnectionKey, and FolderEntrypath and provides a list of non-scheduled workbooks and FolderEntries data that is accessible from the connection for the FolderEntrypath. The list of non-scheduled workbooks includes all of the shared workbooks for the database user that was used in the connection.

When the connection is to relational data, workbooks are stored in a single level in the EUL. The only valid value for FolderEntrypath is “”. An empty string specifies the root folder entry in both Discoverer Plus Relational and Discoverer Plus OLAP.

When the connection is to OLAP data, FolderEntries and Workbooks are stored in the Discoverer Catalog. There can be multiple levels of FolderEntries, which can be queried by providing the appropriate FolderEntryPath. Clients must make successive calls to this method to browse FolderEntries.

API Details
Method
Public FolderEntryList getFolderEntryList(SessionKey aSessionKey,
 ConnectionKey aCkey, FolderEntrypath fpath ) { }
Input:
  • SessionKey
  • ConnectionKey

  • FolderEntryPath

    Path under which Workbooks and FolderEntries are required.

Output
  • FolderEntryList object
Exceptions
  • java.rmi.RemoteException

The following table lists the fields of the structures.

Structure Fields
FolderEntryList
  • Array of FolderEntry objects
  • String country

  • String variant

FolderEntry
  • FolderEntryName
  • FolderEntrypath

    Fully qualified path to either the FolderEntry or the WorkbookEntry.

  • FolderEntryType

  • FolderEntryDescription

FolderEntryName
  • String name
FolderEntryPath
  • String path
FolderEntryDescription
  • String description
FolderEntryType
  • String type

    Either FolderEntry or WorkbookEntry.

  • WorkbookKey

    Valid if the type is WorkbookEntry.

WorkbookKey
  • String wbDevKey
  • ConnectionKey


2.4 getLayoutMetaData

This API call obtains the layout metadata for a selected worksheet. It accepts SessionKey and WorksheetKey, and it provides the Layout information for the worksheet that is identified by WorksheetKey.

API Details
Method
Public Layout getLayoutMetaData(SessionKey aSessionKey,
 WorksheetKey  aWorksheetKey ) {}
Input:
  • SessionKey
  • WorksheetKey

Output
  • Layout
Exceptions
  • java.rmi.RemoteException

The following table lists the fields of the structures.

Structure Fields
Layout
  • Array of Dimension objects
  • Array of Measure objects

Dimension
  • String label
Measure
  • String label

2.5 getParameterMetaData

This API call obtains the parameter metadata for a selected worksheet. It accepts SessionKey and WorksheetKey and provides the list of parameters for the specified worksheet that is identified by WorksheetKey

API Details
Method
Public ParameterList getParameterMetaData(SessionKey aSessionKey,
 WorksheetKey  aWorksheetKey ) {}
Input:
  • SessionKey
  • WorksheetKey

Output
  • ParameterList
Exceptions
  • java.rmi.RemoteException

The following table lists the fields of the structures.

Structure Fields
ParameterList
  • Array of Parameter objects.

2.6 getParameterValueList

This API call obtains the parameter LOVs using a ParameterKey. It accepts SessionKey, ParameterKey, and numValues and provides the list of values (LOVs). You call this method for parameters that have LOVs. The LOVs are retrieved in chunks (the size is specified by numValues), and you can page through from start to finish in one direction only; there is no bi-directional paging support of parameters. The client application is responsible for caching the parameters.

API Details
Method
Public ParameterValueList getParameterValueList(SessionKey
 aSessionKey, ParameterKey aParamKey, int numValues){ }
Input:
  • SessionKey
  • ParameterKey

  • numValues

    An integer value that specifies the number of values that the web service should return in one call. If there are more values getParameterValueList should be called repeatedly.

Output
  • ParameterValueList
Exceptions
  • java.rmi.RemoteException
Notes
  • Parameter linking is inactive.

The following table lists the fields of the structures.

Structure Fields
ParameterValueList
  • Array of ParameterValue Objects
  • Boolean finished


2.7 getCascadeParameterValueList

This API call obtains the parameter LOVs using a ParameterKey and ParameterSelectList. It accepts SessionKey, ParameterKey, numValues, and ParameterSelectList and provides the list of values (LOVs) in the cascading style. In cascading parameters, the LOVs of one parameter depends on the value selected for the preceding parameter in the worksheet. The LOVs are retrieved in chunks (the size is specified by numValues), and you can page through from start to finish in one direction only; there is no bi-directional paging support of parameters. The client application is responsible for caching the parameters.

API Details
Method
Public ParameterValueList getCascadeParameterValueList(SessionKey
 aSessionKey, ParameterKey aParamKey, int numValues, ParameterSelectList pselectList){ }
Input:
  • SessionKey
  • ParameterKey

  • numValues

    An integer value that specifies the number of values that the web service should return in one call. If there are more values getCascadeParameterValueList should be called repeatedly.

  • ParameterSelectList

Output ParameterValueList
Exceptions
  • DiscovererWSException
  • DiscovererSessionUnavailableException

  • DiscovererSessionCreationFailedException


The following table lists the fields of the structures.

Structure Fields
ParameterValueList
  • Array of ParameterValue Objects
  • Boolean finished


2.8 getQueryStatus

This API call returns the status of the query, such as executing or canceled. It accepts SessionKey and QueryKey.

API Details
Method
Public QueryStatus getQueryStatus(SessionKey aSessionKey,
 QueryKey aQueryKey){ }
Input:
  • SessionKey
  • QueryKey

Output
  • QueryStatus
Exceptions
  • java.rmi.RemoteException

The following table lists the fields of the structures.

Structure Fields
QueryStatus
  • String detail
  • String status

Status is one of the following:

  • QUERY_FAILED

  • QUERY_EXECUTING

  • QUERY_CANCELED

  • QUERY_RESULTS_READY

  • QUERY_NEEDS_EXECUTING

  • QUERY_NOT_DEFINED

  • QUERY_SCHEDULED

  • QUERY_VALIDATING


2.9 getVersion

This API call provides the web service component version. Any change in the web service interface or API causes the version number to change. Use the version number to assist you in determining the functionality that is available for the web service.

API Details
Method
Public String getVersion( ) { }
Input:
  • Void
Output
  • String

A version of 1.0 implies support for integration with Oracle BI Publisher.

A version of 2.0 implies support for integration with Oracle BI Publisher and interoperability with Oracle BI Enterprise Edition.

Exceptions
  • None

2.10 getViewerURL

This API call provides the URL of the Discoverer Viewer instance that is hosted on the same machine as the web service. This URL can be used by clients to launch Discoverer Viewer from within their application.

API Details
Method
Public String getViewerURL(SessionKey aSessionKey,
 WorksheetKey aWorksheetkey, List aParameteSelectList){ }
Input:
  • SessionKey
  • WorksheetKey

  • Java.util.List of ParameterSelect

Output
  • String

    URL to launch Discoverer Viewer.

Exceptions
  • java.rmi.RemoteException

2.11 getWorksheetData

This API call accepts SessionKey and QueryKey and provides the worksheet data in the format type that is specified in QueryOption in the submitWorksheetQuery method. If the result set is large and is Rowset XML, then by default, 25 rows of data are returned. For other format types, 1MB of data is returned. You can page through the remaining data by calling this method repeatedly. If the finished flag in QueryResults is false , then call the method again to continue paging through the data. You can page through from start to finish in one direction only; there is no bi-directional paging support.

API Details
Method
Public QueryResult getWorksheetData(SessionKey aSessionKey,
 QueryKey aQueryKey){ }
Input:
  • SessionKey
  • QueryKey

Output
  • QueryResult
Exceptions
  • java.rmi.RemoteException

The following table lists the fields of the structures.

Structure Fields
QueryResult
  • String data

    Rowset XML, HTML, PDF, XLS data. HTML, PDF, XLS data uses base64 encoding.

  • Boolean finished

    If finished is true, then do not call GetWorksheetData.


The following table describes the export types.

Export type Relational OLAP
HTML HTML file is zipped and base64 encoded before transfer. HTML file is zipped and base64 encoded before transfer.
PDF PDF file is base64 encoded before transfer. PDF file is base64 encoded before transfer.
XLS XLS file is base64 encoded before transfer. Similar to Discoverer Viewer, graphs are not exported. XLS file is zipped in base64 encoded before transfer. Graphs are exported.

For HTML, PDF, and XLS export types

  • If the worksheet does not have page items, then all the data is exported.

  • If the worksheet has page items, the output is different for OLAP and Relational connections as follows:

    • For Relational connections:

      HTML, PDF, and XLS export types - Returns worksheet data for the page items selected in the worksheet.

    • For OLAP connections:

      XLS export types - Returns worksheet data for all combination of page item values.

      HTML or PDF export types - Returns worksheet data for the selected page item.

This export behavior is similar to Viewer with the exception that the "isCurrentPageItemsExportForOLAP" setting in the configuration.xml file is not respected.

Sample Rowset XML structure

<BIData>
 <Query id="1">
   <PAGE>    
    <ROWSET>         
     <ROW>    
      <Dimension L="Time Dimension Values">1996</D> 
       < Dimension L="Product Dimension Values">TOTALPROD</D>       
       < Dimension L="Geography Dimension Values">WORLD</D>        
       < Dimension L="Channel Dimension Values">TOTALCHANNEL</D>   
       <Measure L="Dollar Sales">1.18247112042864E8</M>    
       <Measure L="Quota">5475441.87541972</M>     
     </ROW>  
     <ROW>   
       < Dimension L="Time Dimension Values">1997</D>      
       < Dimension L="Product Dimension Values">TOTALPROD</D>      
       < Dimension L="Geography Dimension Values">WORLD</D>        
       < Dimension L="Channel Dimension Values">TOTALCHANNEL</D>   
       <Measure L="Dollar Sales">4.64121127850704E7</M>    
       <Measure L="Quota">2917189.84519184</M>     
     </ROW>  
    </ROWSET>
   </PAGE>
 </Query>
</BIData>

2.12 getWorkSheetList

This API call accepts SessionKey and WorkbookKey and provides the list of worksheets within a workbook that is specified in WorkbookKey.

API Details
Method
Public WorksheetList getWorkSheetList(SessionKey aSessionKey, WorkbookKey  aWorkbookKey ) {}
Input:
  • SessionKey
  • WorkbookKey

Output
  • WorksheetList
Exceptions
  • java.rmi.RemoteException

The following table lists the fields of the structures.

Structure Fields
WorksheetList
  • Array of Worksheet objects
Worksheet
  • WorksheetName
  • WorksheetKey

  • Array of Parameter objects.

    This is always a zero-sized array.

WorksheetName
  • String name
WorksheetKey
  • String wsDevKey

    Identifies a worksheet. For Discoverer Plus Relational and Discoverer Plus OLAP, this is a string.

  • WorkbookKey


2.13 isSessionValid

This API call accepts a SessionKey and returns a Boolean value that indicates whether the specified session is valid.

API Details
Method
Public boolean isSessionValid( SessionKey sKey ) { }
Input:
  • SessionKey
Output
  • true if session is valid, false otherwise
Exceptions
  • java.rmi.RemoteException

2.14 login

This API call provides a mechanism for user identity propagation between the client application and the Discoverer Web Services. Authentication occurs during every invocation of the Discoverer Web Services. For more information, see "About authentication and authorization".For every login made by a client application, the Discoverer Web Services create a new Discoverer user session and allocate it to the user.This API call accepts UserCredential and LocaleBean information and returns a unique SessionKey, which is then passed to all other API calls. This API call does not create a new HTTP session if a session exists between the client application instance and the Discoverer Web Services.

API Details
Method
Public SessionKey login(UserCredential aUserCredential, LocaleBean aLocale) { }
Input:
  • UserCredential

    This object must contain a valid login details of a Discoverer user.

  • LocaleBean

    This object passes locale information to the webservice session. By default the Locale is English (en-US).

Output
  • SessionKey
Exceptions
  • java.rmi.RemoteException

The following table lists the fields of the structures.

Structure Fields
LocaleBean
  • String language
  • String country

  • String variant

UserCredential
  • Identifier anIdentifier
  • DisplayName aDisplayName

Identifier
  • String id
DisplayName
  • String user
SessionKey
  • String key

    Securely generated random alphanumeric sequence.


2.15 logout

This API call informs the Discoverer Web Services API about the completion of the user session. This call frees the dedicated Discoverer session that was associated with the user session and returns the Discoverer session to the session pool.

API Details
Method
Public void logout(SessionKey aSessionKey ) { }
Input:
  • SessionKey
Output
  • Void
Exceptions
  • java.rmi.RemoteException

2.16 requestQueryCancel

This API call cancels a query request and removes the resources that are associated with that request. Call this method for queries that have been submitted but whose data has not yet been fetched. If the query data has been fetched, then the resources are removed. This asynchronous API call returns immediately.

API Details
Method
Public Void requestQueryCancel(SessionKey aSessionKey, QueryKey){ }
Input:
  • SessionKey
Output
  • Void
Exceptions
  • java.rmi.RemoteException

2.17 submitWorksheetQuery

This API call submits the query for the specified worksheet for execution. This asynchoronous API call returns immediately, without waiting for the query execution to complete.

API Details
Method
Public QueryKey submitWorksheetQuery(SessionKey aSessionKey, WorksheetKey aWorksheetkey, List aParameteSelectList, QueryOption aQueryOption){ }
Input:
  • SessionKey
  • WorksheetKey

  • Java.util.List of ParameterSelect

  • QueryOption

Output
  • QueryKey
Exceptions
  • java.rmi.RemoteException

The following table lists the fields of the structures.

Structure Fields
QueryKey
  • String queryId

    A secure and unique key that is randomly generated.

ParameterSelect
  • ParameterKey
  • Array of ParameterValue objects

QueryOption
  • int NoOfRows

    The number of rows to return in Rowset XML. The default is 25.

  • int NoOfRows

    The number of rows to return in Rowset XML. The default is 25.

  • int chunksize

    The size of data chunks in kilobytes for PDF, XLS and HTML formats. The default is 64 KB.

  • ResultType

  • UserCredential

    The GUIDUsername or SSOUsername of the user for whom the query is run. If no user name is specified, then the query is run for the user who has logged in.

LocaleBean
  • String type

Valid types are:

  • XMLROWSET

  • HTML - base64 encoded content returned in data string

  • PDF - base64 encoded content returned in data string

  • XLS - base64 encoded content returned in data string