Create Drill Through Report
/applications/{applicationName}/databases/{databaseName}/reports
Creates a drill through report definition in the specified application and database and returns details about the report. Drill through is useful when the cube contains aggregated values and an external source system has more detailed data. A drill through report definition determines the access users should have to information in the external source system.
Drill through report definitions are associated with a cube, and include a column mapping (required), a drillable region (required), and a mapping for runtime parameters (optional - can be used if the Datasource query is parameterized).
To create a drill through report definition, you must be a Database Manager or higher.
Request
-
applicationName(required):
Application name.
-
databaseName(required):
Database name.
Response
200 Response
OK
The drill through report definition was created successfully.
400 Response
Bad Request
Failed to create the drill through report definition. The application or database name may be incorrect, or the report may already exist.
415 Response
Not Acceptable
The media type isn't supported or wasn't specified.
500 Response
Internal Server Error.
Examples
The following example shows how to create a drill through report definition.
This example uses cURL to access the REST API from a Windows shell script. The calling user's ID and password are variables whose values are set in properties.bat.
Script with cURL Command
call properties.bat
curl -X POST "https://myserver.example.com:9001/essbase/rest/v1/applications/SampleDtr/databases/Basic/reports" -H Accept:application/json -H Content-Type:application/json --data "@./drill3_create.json" -u %User%:%Password%Sample JSON Payload
The cURL example above delivers the following JSON payload in drill3_create.json.
{
"name" : "drill3",
"columns" : [ "DIMENSION_PRODUCT", "DIMENSION_MARKET", "DIMENSION_YEAR", "DIMENSION_SCENARIO", "SALES", "COGS", "MARKETING", "PAYROLL", "MISC", "INITIAL_INVENTORY", "ADDITIONS" ],
"dataSourceName" : "phx_DS",
"drillableRegions" : [ "@DESCENDANTS(\"Measures\")" ],
"columnMapping" : {
"DIMENSION_PRODUCT" : {
"dimension" : "Product",
"type" : "DIMENSION"
},
"DIMENSION_MARKET" : {
"dimension" : "Market",
"level" : "Level0",
"type" : "LEVEL0"
},
"DIMENSION_YEAR" : {
"dimension" : "Year",
"generation" : "Quarter",
"type" : "GENERATION",
"generationNumber" : 2
},
"DIMENSION_SCENARIO" : {
"dimension" : "Scenario",
"generation" : "Gen1",
"type" : "GENERATION",
"generationNumber" : 1
}
},
"parameterMapping" : {
"Param1" : {
"dimension" : "Year",
"level" : "Level0",
"type" : "LEVEL0"
}
},
"type" : "DATASOURCE",
"useTempTables" : false
}Example of Response Body
The following example shows the contents of the response body in JSON format:
{
"name" : "drill3",
"columns" : [ "DIMENSION_PRODUCT", "DIMENSION_MARKET", "DIMENSION_YEAR", "DIMENSION_SCENARIO", "SALES", "COGS", "MARKETING", "PAYROLL", "MISC", "INITIAL_INVENTORY", "ADDITIONS" ],
"dataSourceName" : "phx_DS",
"drillableRegions" : [ "@DESCENDANTS(\"Measures\")" ],
"columnMapping" : {
"DIMENSION_PRODUCT" : {
"dimension" : "Product",
"type" : "DIMENSION"
},
"DIMENSION_MARKET" : {
"dimension" : "Market",
"level" : "Level0",
"type" : "LEVEL0"
},
"DIMENSION_YEAR" : {
"dimension" : "Year",
"generation" : "Quarter",
"type" : "GENERATION",
"generationNumber" : 2
},
"DIMENSION_SCENARIO" : {
"dimension" : "Scenario",
"generation" : "Gen1",
"type" : "GENERATION",
"generationNumber" : 1
}
},
"parameterMapping" : {
"Param1" : {
"dimension" : "Year",
"level" : "Level0",
"type" : "LEVEL0"
}
},
"type" : "DATASOURCE",
"useTempTables" : false
}