Export Query Results

Exports query results for a given query into the Outbox. You can export the Essbase data of a given query or an entire application. This triggers a job that writes query results into the given file name.

REST Resource

POST /epm/rest/{api_version}/applications/{application}/jobs/exportQueryResultsJob


Supported Media Types: application/json


The following table summarizes the client request.

Table 13-38 Parameters

Name Description Type Required Default
api_version Version of the API you are developing with, such as v1 Path Yes None
application Name of the application Path Yes None
queryName Query name from the Oracle Profitability and Cost Management Cloud application

When queryName has a value, results for the given query are exported; exportOnlyLevel0Flg is considered if it is included.

WhenqueryName is blank or not included, data for the entire application is exported. In this case, exportOnlyLevel0Flg is ignored.

Payload No None
fileName Name of the query output file to be exported into the Outbox folder Payload Yes None
exportOnlyLevel0Flg Whether to export only Level0 data; values are true or false Payload No None
roundingPrecision The rounding precision (decimal places) for exported data. (Note: Applies only if queryName is also used.) Payload No 2

Example URL and payload


{"queryName":"Profitability - Product","fileName":"ProfitabilityProduct_03232016.txt","exportOnlyLevel0Flg":"true","roundingPrecision":"3"}

Response Body

Supported Media Types: application/json

Table 13-39 Parameters

Name Description
details Task ID, such as BksML12_BksML12_ExportQueryResults_D20160323T024820_f73_1
status See Migration Status Codes
statusMessage Message about the status, such as In Progress
type Profitability
data Parameters as key value pairs
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request

Example of Response Body:

The following shows an example of the response body in JSON format.

    "type": "Profitability",
    "status": -1,
    "statusMessage": "In Progress",
    "details": "BksML12_BksML12_ExportQueryResults_D20160323T024820_f73_1",
    "links": [{
        "href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/epm/rest/v1/applications/BksML12/jobs/exportQueryResultsJob",
        "action": "POST",
        "rel": "self",
        "data": {
            "exportOnlyLevel0Flg": true,
            "queryName": "Profitability - Product",
            "fileName": "ProfitabilityProduct_03232016.txt"
    }, {
        "action": "GET",
        "rel": "Job Status"