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. You can set custom parameters to view rejected cells to understand the reason for the rejection.

Required roles

Any role

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 8-69 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://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/plantypes/plan1/importdataslice

Payload Parameters

The Payload is JSON with the following parameters.

Table 8-70 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 existing 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"
strictDateValidation Optionally, influence how Date cell values are validated. When set to true, date values are validated against the dateFormat specified in the payload and are rejected if the format for the value does not conform to the dateFormat. If set to false, date values are interpreted more leniently. Default is true.
customParams  
PostDataImportRuleNames

Optionally, provide the post data import rule names. This is primarily used by Data Management for planners. Default is false.

includeRejectedCells Optionally, indicate if the response should include the first 100 rejected cells. Default is true.
includeRejectedCellsWithDetails Optionally, indicate if the response should include the reasons why cells are rejected. Default is false.

Table 8-71 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:

{
   "aggregateEssbaseData":true,
   "cellNotesOption":"Overwrite",
   "dateFormat":"DD/MM/YYYY",
   "strictDateValidation":true,
    "dryRun": true,
   "customParams":{
       "PostDataImportRuleNames":"Post data rule 1, \"post, data rule 2\"",      
       "IncludeRejectedCells":true, 
       "IncludeRejectedCellsWithDetails":true 
    },

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; cells where the data is invalid (for example, an invalid Smart List value); and cells that are non-numeric (Smart List, Text, or Date type) 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]"],