This service allows for listing, download, upload, and removal of Analysis files or Mondrian schemas in the BA Platform.
The following resources are applicable:
- /data-access/api/datasource/analysis/catalog
- /data-access/api/datasource/analysis/catalog/{catalogId }
/data-access/api/datasource/analysis/catalog
GET
Get a list of analysis data source ids.
Example Request:
GET pentaho/plugin/data-access/api/datasource/analysis/catalog
Response Body
element: | List |
media types: | application/xml application/json |
A list of catalog IDs.
Example Response:
{ "Item":[ { "@type":"xs:string", "$":"SampleData" }, { "@type":"xs:string", "$":"SteelWheels" }, { "@type":"xs:string", "$":"pentaho_operations_mart" } ] }
Status Codes
code | description |
---|---|
200 | Successfully retrieved the list of analysis IDs |
/data-access/api/datasource/analysis/catalog/{catalogId }
The following operations are supported on this resource:
GET
Download the analysis files for a given analysis id.
Example Request:
GET pentaho/plugin/data-access/api/datasource/analysis/catalog/SampleSchema
Parameters
name | description | type |
---|---|---|
catalogId | String Id of the analysis data to retrieve. | path |
Response Body
element: | (custom) |
media types: | */* application/xml application/octet-stream |
Response containing the analysis file data XML.
Example Response:
<?xml version="1.0"?> <Schema name="SampleData2"> <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"/> </Cube> </Schema>
Status Codes
code | description |
---|---|
200 | Successfully downloaded the analysis file |
401 | Unauthorized |
500 | Unabled to download analysis file |
DELETE
Remove the analysis data for a given analysis ID.
Example Request:
DELETE pentaho/plugin/data-access/api/datasource/analysis/catalog/{catalog}
Parameters
name | description | type |
---|---|---|
catalogId | ID of the analysis data to remove. | path |
Response Body
element: | (custom) |
media types: | */* application/xml application/octet-stream |
A 200 response code representing the successful removal of the analysis datasource.
Example Response:
This response does not contain data.
Status Codes
code | description |
---|---|
200 | Successfully removed the analysis data |
401 | User is not authorized to delete the analysis datasource |
500 | Unable to remove the analysis data. |
PUT
Import Analysis Schema.
Example Request:
PUT pentaho/plugin/data-access/api/datasource/analysis/catalog/SampleSchema
PUT data:
------WebKitFormBoundaryNLNb246RTFIn1elY Content-Disposition: form-data; name="uploadAnalysis"; filename="SampleData2.mondrian.xml" Content-Type: text/xml <?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> ------WebKitFormBoundaryNLNb246RTFIn1elY Content-Disposition: form-data; name="parameters" DataSource=SampleData2;overwrite=true ------WebKitFormBoundaryNLNb246RTFIn1elY Content-Disposition: form-data; name="schemaFileInfo" test.xml ------WebKitFormBoundaryNLNb246RTFIn1elY Content-Disposition: form-data; name="catalogName" Catalog Name ------WebKitFormBoundaryNLNb246RTFIn1elY Content-Disposition: form-data; name="xmlaEnabledFlag" true ------WebKitFormBoundaryNLNb246RTFIn1elY--
Parameters
name | description | type |
---|---|---|
catalogId | (optional) The catalog name. | path |
uploadAnalysis | A Mondrian schema XML file. | formdata |
schemaFileInfo | User selected name for the file. | formdata |
origCatalogName | (optional) The original catalog name. | formdata |
datasourceName | (optional) The datasource name. | formdata |
overwrite | Flag for overwriting existing version of the file. | formdata |
xmlaEnabledFlag | Is XMLA enabled or not. | formdata |
parameters | Import parameters. | formdata |
Response Body
element: | (custom) |
media types: | text/plain |
Response containing the success of the method.
Example Response:
200
Status Codes
code | description |
---|---|
409 | Content already exists (use overwrite flag to force) |
401 | Import failed because publish is prohibited |
500 | Unspecified general error has occurred |
412 | Analysis datasource import failed. Error code or message included in response entity |
403 | Access Control Forbidden |
201 | Indicates successful import |