Data Source APIs Analysis Resource

This service allows for listing, downloading, uploading, and removal of Analysis files or Mondrian schemas in the BA Platform.

Get list of analysis data source IDs

get

Get a list of analysis data source ids.

Example Request:

GET pentaho/plugin/data-access/api/datasource/analysis/catalog
Authorizations
AuthorizationstringRequired

HTTP Basic Authentication

Responses
chevron-right
200

Successfully retrieved the list of analysis IDs

objectOptional

List of catalog IDs in XML format

get
/data-access/api/datasource/analysis/catalog
200

Successfully retrieved the list of analysis IDs

Download analysis schema file

get

Download the analysis files for a given analysis id.

Example Request:

GET pentaho/plugin/data-access/api/datasource/analysis/catalog/SampleSchema
Authorizations
AuthorizationstringRequired

HTTP Basic Authentication

Path parameters
catalogstringRequired

String Id of the analysis data to retrieve.

Responses
chevron-right
200

Successfully downloaded the analysis file

application/octet-stream
string · binaryOptional

Analysis file data XML

get
/data-access/api/datasource/analysis/catalog/{catalogId}

Import analysis schema

put

Import Analysis Schema.

Example Request:

PUT pentaho/plugin/data-access/api/datasource/analysis/catalog/SampleSchema

Request body should contain multipart/form-data with the analysis file to upload.

Example cURL Command:

curl -v -H "Content-Type: multipart/form-data" -X PUT \
  -F uploadInput=@/Users/username/Downloads/SampleData2.mondrian.xml \
  -F overwrite=true \
  -F xmlaEnabledFlag=false \
  -F parameters="Datasource=SampleData" \
  -u admin:password \
  http://localhost:8080/yourdomain/plugin/data-access/api/datasource/analysis/catalog/SampleData2

Example Mondrian Schema XML for uploadInput:

<?xml version="1.0"?>
<Schema name="SampleData2">
  <!-- Shared dimensions -->
  <Dimension name="Region">
    <Hierarchy hasAll="true" allMemberName="All Regions">
      <Table name="QUADRANT_ACTUALS"/>
      <Level name="Region" column="REGION" uniqueMembers="true"/>
    </Hierarchy>
  </Dimension>
  <Dimension name="Department">
    <Hierarchy hasAll="true" allMemberName="All Departments">
      <Table name="QUADRANT_ACTUALS"/>
      <Level name="Department" column="DEPARTMENT" uniqueMembers="true"/>
    </Hierarchy>
  </Dimension>
  <Dimension name="Positions">
    <Hierarchy hasAll="true" allMemberName="All Positions">
      <Table name="QUADRANT_ACTUALS"/>
      <Level name="Positions" column="POSITIONTITLE" uniqueMembers="true"/>
    </Hierarchy>
  </Dimension>
  <Cube name="Quadrant Analysis">
    <Table name="QUADRANT_ACTUALS"/>
    <DimensionUsage name="Region" source="Region"/>
    <DimensionUsage name="Department" source="Department"/>
    <DimensionUsage name="Positions" source="Positions"/>
    <Measure name="Actual" column="ACTUAL" aggregator="sum" formatString="#,###.00"/>
    <Measure name="Budget" column="BUDGET" aggregator="sum" formatString="#,###.00"/>
    <Measure name="Variance" column="VARIANCE" aggregator="sum" formatString="#,###.00"/>
    <!-- <CalculatedMember name="Variance Percent" dimension="Measures"
         formula="([Measures].[Variance]/[Measures].[Budget])*100" /> -->
  </Cube>
</Schema>
Authorizations
AuthorizationstringRequired

HTTP Basic Authentication

Path parameters
catalogNamestringRequired

The catalog name.

Body
uploadInputstring · binaryOptional

Analysis file to upload (Mondrian XML schema file)

schemaFileInfostringOptional

User selected name for the file

origCatalogNamestringOptional

The original catalog name

datasourceNamestringOptional

The datasource name

overwritestring · enumOptional

Whether to overwrite existing analysis data

Possible values:
xmlaEnabledFlagstring · enumOptional

Enable XMLA flag

Possible values:
parametersstringOptional

Import parameters

Responses
chevron-right
200

Successfully imported the analysis schema

text/plain
stringOptional

Success message

put
/data-access/api/datasource/analysis/catalog/{catalogId}

Remove analysis data

delete

Remove the analysis data for a given analysis ID.

Example Request:

DELETE pentaho/plugin/data-access/api/datasource/analysis/catalog/{catalog}
Authorizations
AuthorizationstringRequired

HTTP Basic Authentication

Path parameters
catalogstringRequired

ID of the analysis data to remove.

Responses
chevron-right
200

Successfully removed the analysis data

text/plain
stringOptional

Success message

delete
/data-access/api/datasource/analysis/catalog/{catalogId}

Last updated

Was this helpful?