Import Data Slices

This REST API 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-72 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-73 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-74 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]"],

Example: Importing a data slice (Project Assumptions) with one dimension on the row and column and with cells of Text/Date and SL data types.

Sample Payload:

{
  "dateFormat": "MM/DD/YYYY",
  "customParams": {
    "IncludeRejectedCells": true,
    "IncludeRejectedCellsWithDetails": true
  },
  "dataGrid": {
    "pov": [
      "BaseData",
      "FY24",
      "No Product",
      "Plan",
      "Working",
      "Computer Resources"
    ],
    "columns": [
      [
        "BegBalance"
      ]
    ],
    "rows": [
      {
        "headers": [
          "Project Number"
        ],
        "data": [
          "1"
        ]
      },
      {
        "headers": [
          "Request Date"
        ],
        "data": [
          "1/1/24"
        ]
      },
      {
        "headers": [
          "Project Type"
        ],
        "data": [
          "IT"
        ]
      },
      {
        "headers": [
          "Project Investment"
        ],
        "data": [
          10000
        ]
      }
    ]
  }
}

JSON Output:

The following shows an example of the response body with all cells accepted.

{
    "numAcceptedCells": 4,
    "numRejectedCells": 0,
    "rejectedCells": [],
    "rejectedCellsWithDetails": []
}

Example: Importing a data slice (Sales Driver Assumptions) with multiple dimensions on rows and columns. Here you see a few cells being rejected due to Invalid Intersection rules.

Sample Payload:

{
  "dateFormat": "MM/DD/YYYY",
  "customParams": {
    "includeRejectedCells": true,
    "IncludeRejectedCellsWithDetails": true
  },
  "dataGrid": {
    "pov": [
      "BaseData",
      "FY24",
      "BegBalance"
    ],
    "columns": [
      [
        "Mexico",
        "Mexico",
        "Canada",
        "Canada"
      ],
      [
        "Plan",
        "Forecast",
        "Plan",
        "Forecast"
      ]
    ],
    "rows": [
      {
        "headers": [
          "Units",
          "P_100",
          "Working"
        ],
        "data": [
          "100",
          "150",
          "1500",
          "1500"
        ]
      },
      {
        "headers": [
          "Avg Order Size",
          "P_000",
          "Best Case"
        ],
        "data": [
          "1000",
          "2000",
          "10000",
          "15000"
        ]
      },
      {
        "headers": [
          "Close Rate",
          "P_000",
          "Best Case"
        ],
        "data": [
          "70%",
          "90%",
          "85%",
          "95%"
        ]
      }
    ]
  }
}

JSON Output:

The following shows an example of the response body with a few cells rejected due to Invalid Intersection rules.

{
  "numAcceptedCells": 8,
  "numRejectedCells": 4,
  "rejectedCells": [
    "[BaseData, FY24, BegBalance, Mexico, Plan, Avg Order Size, P_000, Best Case]",
    "[BaseData, FY24, BegBalance, Canada, Plan, Avg Order Size, P_000, Best Case]",
    "[BaseData, FY24, BegBalance, Mexico, Plan, Close Rate, P_000, Best Case]",
    "[BaseData, FY24, BegBalance, Canada, Plan, Close Rate, P_000, Best Case]"
  ],
  "rejectedCellsWithDetails": [
    {
      "memberNames": [
        "BaseData",
        "FY24",
        "BegBalance",
        "Mexico",
        "Plan",
        "Avg Order Size",
        "P_000",
        "Best Case"
      ],
      "readOnlyReasons": [
        "Invalid Intersection"
      ],
      "otherReasons": []
    },
    {
      "memberNames": [
        "BaseData",
        "FY24",
        "BegBalance",
        "Canada",
        "Plan",
        "Avg Order Size",
        "P_000",
        "Best Case"
      ],
      "readOnlyReasons": [
        "Invalid Intersection"
      ],
      "otherReasons": []
    },
    {
      "memberNames": [
        "BaseData",
        "FY24",
        "BegBalance",
        "Mexico",
        "Plan",
        "Close Rate",
        "P_000",
        "Best Case"
      ],
      "readOnlyReasons": [
        "Invalid Intersection"
      ],
      "otherReasons": []
    },
    {
      "memberNames": [
        "BaseData",
        "FY24",
        "BegBalance",
        "Canada",
        "Plan",
        "Close Rate",
        "P_000",
        "Best Case"
      ],
      "readOnlyReasons": [
        "Invalid Intersection"
      ],
      "otherReasons": []
    }
  ]
}