DEE Responses

Common JSON format across all the results

All the result returned by the REST API are structured as follows:

{
  "status": "[success|error]",
  "data": {
    ...
  }
}

In case of error the following structure is sent:

{
  "status": "error",
  "data": {
    "errorChain": [
      {
        "type": "",
        "message": ""
      },
      ...
    ],
    "stackTrace": ""
  }
}

Endpoints and Responses

The following matrix outlines the different endpoints and the information their response contains.

Endpoint Response
submitTasks Return the list of task ids (String) as a result
submitOrders Return the list of task ids (String) as a result
submitTemplateOrders Return the list of task ids (String) as a result
addTemplateOrder Does not return any specific value
removeTemplateOrder Does not return any specific value
clearOldCompletedTasks Returns the number of tasks cleared
isTaskCompleted Simply return a boolean.
isTaskListCompleted Simply return a boolean.
getTaskStatus Return a result based on the DeeTaskInfoDTO and DeeResultFileInfoDTO classes.
getTaskListStatus Return a result based on the DeeTaskInfoDTO and DeeResultFileInfoDTO classes.
cancelTask Return a result based on the DeeTaskInfoDTO and DeeResultFileInfoDTO classes.
cancelTaskList Return a result based on the DeeTaskInfoDTO and DeeResultFileInfoDTO classes.

Enhanced Drillthrough Endpoints and Responses

Here are the endpoints exposed by the Enhanced Drillthrough component of the Extraction Engine:

Endpoint Response
executeSearchFacts Returns list of Object[] representing the extracted attributes for each fact that fell into the query scope
executeEnhancedDrillthrough Returns no content, just an ok or error status
retrieveEnhancedDrillthroughResult Returns the current status of the task in an EnhancedDrillthroughTaskInfoDTO object.
cancelEnhancedDrillthrough Returns the last status of the task if the query has been cancelled, nothing otherwise
getEnhancedDrillthroughMaxRows/{pivotId} Returns the max rows value for the specified cube
executeEnhancedCount Returns the number of aggregate DTO’s returned as results of the query

Response Examples

Below are examples for the different endpoints.

Submit calls

The methods submitTasks, submitOrders and submitTemplateOrders return the list of task ids (String) as a result.

Example response for submitTasks:

{
  "status": "success",
  "data": [
    "1612394532198_2"
  ]
}

Template calls

The methods addTemplateOrder and removeTemplateOrder do not return any specific value.

Clean-up calls

The method clearOldCompletedTasks returns the number of tasks cleared.

Example response:

{
  "status": "success",
  "data": 1
}

Check if task(s) is completed

The methods isTaskCompleted and isTaskListCompleted simply return a boolean.

Example response for isTaskCompleted:

{
  "status": "success",
  "data": true
}

Status calls

The methods getTaskStatus, getTaskListStatus, cancelTask and cancelTaskList return a result based on the DeeTaskInfoDTO and DeeResultFileInfoDTO classes.

Below are examples of a Json response DTO objects:

JSON Status Call Result Format

{
  "status": "success",
  "data": {
    "taskId": "1",
    "taskOwner": "admin",
    "taskStatus": "RUNNING",
    "statusLastUpdateTime": "24/01/2020 12:58:23",
    "orderName": "orderName",
    "orderDescription": "orderDesc",
    "taskCreationTime": "24/01/2020 12:58:23",
    "taskRunStartTime": "24/01/2020 12:58:23",
    "taskRunStopTime": "24/01/2020 12:58:23",
    "taskExceptionMessage": "exceptionMessage",
    "taskExceptionDetails": "exceptionDetails",
    "dataSetDescription": "dataSetDesc",
    "dataRawSize": "2000",
    "resultFile": [
      {
        "url": "http://path/to/file",
        "size": 2000,
        "linesCount": 10
      }
    ]
  }
}

Enhanced Drillthrough REST Responses

Execute Search Facts Query

Returns list of Object[] representing the extracted attributes for each fact that fell into the query scope

Execute Enhanced Drillthrough Query

Returns no content, just an ok or error status

Retrieve Enhanced Drillthrough Result

The REST service returns a JSON object following the EnhancedDrillthroughTaskInfoDTO definition.

Example of output:

{
  "status": "success",
  "data": {
    "taskOwner": "admin",
    "taskStatus": "SUCCESS",
    "dataRawSize": "2000",
    "taskException": "",
    "resultFiles": [
      {
        "url": "",
        "size": 2000,
        "linesCount": -1
      }
    ]
  }
}

Cancel Enhanced Drillthrough

The REST service returns a JSON object following the EnhancedDrillthroughTaskInfoDTO definition.

Example of output:

{
  "status": "success",
  "data": {
    "taskOwner": "admin",
    "taskStatus": "CANCELLED",
    "dataRawSize": "",
    "taskException": "",
    "resultFiles": []
  }
}

Get Enhanced Drillthrough Max Rows

This returns the maximum number of rows the enhanced drill-through is allowed to extract for a specific cube.

Example of output:

{
  "status": "success",
  "data": 10
}

Execute Enhanced Count

This retrieves the contributors.COUNT for a particular location, with some custom logic to ensure appropriate count calculation when dealing with analysis dimensions in the target cube.

Example of output:

{
  "status": "success",
  "data": 10
}
search.js