Import Data Slices

Can be used to import data given a JSON data grid with a point of view, columns, and one or more data rows. Data will be imported only for cells that the user has read-write access to. Imports data of types Text, Date and Smart List along with numeric data. Returns JSON with details on the number of cells that were accepted, the number of cells that were rejected, and the first 100 cells that were rejected.

REST Resource

POST /HyperionPlanning/rest/{api_version}/applications/{application}/plantypes/{plantype}/importdataslice

Request

Supported Media Types: application/json

Parameters:

The following table summarizes the client request.

Table 5-51 Parameters

Name Description Type Required Default
api_version Version of the API you are developing with Path Yes None
application The name of the application for which to import the data slice Path Yes None
plantype Name of the plan type for which to import the data slice Path Yes None

Example URL and Payload:

https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v3/applications/Vision/plantypes/plan1/importdataslice

Payload Parameters

The Payload is JSON with the following parameters.

Table 5-52 Parameters

Name Description
dataGrid JSON data grid
aggregateEssbaseData

True or false.

If true, the values being saved will be added to the existing values. Only numeric values can be aggregated. Cells with Smart list, Text and Date data types will be rejected.

If false, the data values will be overwritten. A value of “#missing” will clear the cell value as shown in the example. The default is false.

Note: Values provided in the “data” section of the JSON payload will be used even for cells with supporting details provided. For cells with supporting details, make sure the total calculated for the incoming supporting details matches the value provided in the row “data” section.

See the following table for examples.

cellNotesOption

Possible values are: "Overwrite", "Append", and "Skip".

  • "Overwrite": The existing cell notes will be overwritten. An empty array for cell notes [] will indicate deletion of exiting cell notes. A value of "null" will leave the existing cell notes intact.

  • "Append": New cell notes will be appended to existing cell notes.

  • "Skip": Cell notes will not be processed.

dateFormat Date format used in the input data grid. Valid formats are: "MM-DD-YYYY", "DD-MM-YYYY", "YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "YYYY/MM/DD"
customParams

Optionally, you can provide the post data import rule names using a custom parameter called PostDataImportRuleNames. This is primarily used by Data Management for planners.

Table 5-53 Import Data Slice Examples

Source Cell Target Cell Resulting Target Cell

Supporting Detail (SD)

#missing

SD

SD

Value

Add SD value to the existing value, do not add SD

Value

SD

Delete SD, add Value to the existing value

SD1

SD2

Delete SD2, add SD value to the existing value, do not add SD1

Sample payload:

"customParams":{"PostDataImportRuleNames":"Post data rule 1, \"post, data rule 2\""}

{

"aggregateEssbaseData" : true,

"cellNotesOption":"Overwrite",

"dateFormat":"DD/MM/YYYY",

"dataGrid" :{

"pov": ["BaseData", "FY15", "Plan", "Working", "410", "P_160"],

"columns": [

["Jan", "Feb", "Mar"]

],

"rows": [{

"headers": ["Project Number"],

"data": ["1", "2", "3"],

"cellNotes": [

[{

"contents": "Project delayed<br/>"

}, {

"contents": "Internal Project<br/>"

}],

[],

[]

]

}, {

"headers": ["Request Date"],

"data": ["1/02/2016", "30/03/2015", "30/04/2014"]

}, {

"headers": ["Project Type"],

"data": ["Other", "IT", "Construction"]

}, {

"headers": ["Project Investment"],

"data": [100000, 110000, 200000],

"cellNotes": [

[],

[{

"contents": "Internal + External investments made here.<br/>"

}],

[]

],

" supportingDetail": [null,

{

"items": [{

"value": 60000,

"position": 0,

"label": "Internal",

"generation": 0,

"operator": "+"

}, {

"value": 50000,

"position": 1,

"label": "External",

"generation": 0,

"operator": "+"

}]

},

null]

}]

}

}

}

Response

Supported Media Types: application/json

JSON Output

The rejected cells consist of cells that the user does not have read-write access to, cells where row or column member names are invalid and do not exist, and non-numeric (Smart List, Text, or Date type) cells with data when aggregateEssbaseData is set to true

{

"numAcceptedCells": 3,

"numRejectedCells": 9,

"rejectedCells": ["[BaseData, FY15, Plan, Working, 410, P_160, Jan, Project Number]", "[BaseData, FY15, Plan, Working, 410, P_160, Feb, Project Number]", "[BaseData, FY15, Plan, Working, 410, P_160, Mar, Project Number]", "[BaseData, FY15, Plan, Working, 410, P_160, Jan, Request Date]", "[BaseData, FY15, Plan, Working, 410, P_160, Feb, Request Date]", "[BaseData, FY15, Plan, Working, 410, P_160, Mar, Request Date]", "[BaseData, FY15, Plan, Working, 410, P_160, Jan, Project Type]", "[BaseData, FY15, Plan, Working, 410, P_160, Feb, Project Type]", "[BaseData, FY15, Plan, Working, 410, P_160, Mar, Project Type]"]