Run Batch Outline Edit

post

/essbase/rest/v1/applications/{application}/databases/{database}/boe

Executes batch outline editing process. Based on the XML or JSON body, adds or removes members from the outline in the active cube.

Request

Supported Media Types
Path Parameters
Body ()

Batch outline JSON/XML.

Root Schema : otlEditMain
Type: object
Show Source
  • editActions

    The outline editing action to perform. See example for details on each.

    • otlUpdate - change outline properties
    • mbrUpdate - change member properties
    • mbrAdd - add a member
    • mbrDelete - delete a member
    • mbrRename - rename a member
    • mbrMove - move a member
    • mbrAssoc - make or remove member attribute associations
    • dimAdd - add a dimension
    • smartListAddOrUpdate - add or update a text list
    • dimUpdate - change dimension name or properties
    • dimAssoc - make or remove dimension attribute associations
    • markForDelete - mark a dimension to be deleted
    • deleteMarked - delete marked dimension
    • sortChildren - sort a hierarchy
  • Whether to keep transactions: true or false

  • Allowed Values: [ "ALL_DATA", "NO_DATA", "LOW_DATA", "IN_DATA" ]

    Restructure option. ALL_DATA to preserve all existing data (this is the default), NO_DATA to discard all existing data, LOW_DATA to preserve existing level 0 blocks (applicable to block storage only), IN_DATA to preserve existing input-level blocks (applicable to block storage only).

  • Whether to validate the outline: true or false

  • Whether to validate formulas: true or false

Nested Schema : editActions
Type: array

The outline editing action to perform. See example for details on each.

  • otlUpdate - change outline properties
  • mbrUpdate - change member properties
  • mbrAdd - add a member
  • mbrDelete - delete a member
  • mbrRename - rename a member
  • mbrMove - move a member
  • mbrAssoc - make or remove member attribute associations
  • dimAdd - add a dimension
  • smartListAddOrUpdate - add or update a text list
  • dimUpdate - change dimension name or properties
  • dimAssoc - make or remove dimension attribute associations
  • markForDelete - mark a dimension to be deleted
  • deleteMarked - delete marked dimension
  • sortChildren - sort a hierarchy
Show Source
Nested Schema : JAXBElementObject
Type: object
Show Source
Nested Schema : QName
Type: object
Show Source
Nested Schema : value
Type: object
Back to Top

Response

Supported Media Types

200 Response

OK

The batch outline edit completed successfully.

Body ()
Root Schema : BOEOutput
Type: object
Show Source

400 Response

Bad Request

Failed to complete batch outline editing. The output may be invalid, the sequence of metadata operations may be incorrect, or saving the outline may have failed.

Back to Top

Examples

The following example describes batch outline editing, which you can perform from the Essbase REST API using either JSON or XML to structure the edit request.

In batch outline editing, you submit the Essbase application and cube name as path parameters, and you submit a JSON or XML object as the request body containing the outline edit specification.

The edit actions you can specify in the request body are:

Each edit action uses further syntax elements as detailed below. A JSON request body example follows after the descriptions.

otlUpdate

Use this action to make updates to the outline properties.

Object (JSON) or Element (XML) Details
dateFormatValue: date_format Optional. Specification of the date format. Requires enableMemberType to be true.

Example (JSON)

{
  "editActions" : [
     {
      "otlUpdate" : {
        "enableMemberType" : "true",
        "dateFormatValue" : "dd Month yyyy"
        }
     }
   ]
}

Description

Use one of the following literal strings to indicate the preferred date format.

  • "mon dd yyyy" (Example: mon = Aug)

  • "Month dd yyyy" (Example: Month = August)

  • "mm/dd/yy"

  • "mm/dd/yyyy"

  • "yy.mm.dd"

  • "dd/mm/yy"

  • "dd.mm.yy"

  • "dd-mm-yy"

  • "dd Month yy"

  • "dd mon yy"

  • "Month dd, yy"

  • "mon dd, yy"

  • "mm-dd-yy"

  • "yy/mm/dd"

  • "yymmdd"

  • "dd Month yyyy"

  • "dd mon yyyy"

  • "yyyy-mm-dd"

  • "yyyy/mm/dd"

  • Long format (Example: WeekDay, Mon dd, yyyy)

  • Short format (Example: m/d/yy)

aliasTable: name Optional. Alias tables to be added (can repeat up to 56 times).
removeAliasTable: name Optional. Alias tables to be removed (can repeat for all alias tables).
disableDtsMbr: {mbrName: name} Optional. Disable a pre-defined Dynamic Time Series member.
enableDtsMbr {mbrName: name, number: genNum} Optional. Enable a pre-defined Dynamic Time Series member (for example, Q-T-D) at the specified generation number (for example, 2.
setDtsMbrAlias: {dtsAlias {aliasTable: name, alias: value}, mbrName: name} Optional. Associate aliases for Dynamic Time Series members.
attributeSpec Optional. Specifications for handling member names in attribute dimensions.The settings include:
  • genNameBy: PREFIX | SUFFIX
  • useNameOf: NONE | PARENT | GRANDANDPARENT | ALLANCESTORS | DIMENSION
  • delimiter: UNDERSCORE | PIPE | CARET
  • dateFormat: MMDDYYYY | DDMMYYYY (Date member format for date attribute dimensions. Month first or day first.)
  • bucketingType: UPPER_BOUND_INCLUSIVE | LOWER_BOUND_INCLUSIVE | UPPER_BOUND_NON_INCLUSIVE | LOWER_BOUND_NON_INCLUSIVE
  • defaultTrueString: string

    For Boolean attribute dimension types, the default string for True (for example, you might change it to Yes)

  • defaultFalseString: string

    For Boolean attribute dimension types, the default string for False (for example, you might change it to No).

  • defaultAttrCalcDimName: string

    The name of the attribute calculations dimension. The default name is "Attributes Calculation." You can also change the names of members in this dimension. Regardless of the name that you use for a member, the function of the member remains the same. For example, the Sum member always calculates a sum, no matter what you name it.

  • defaultSumMbrName: string

    In an attribute calculations dimension, the name to use when requesting sum data. The default name is "Sum."

  • defaultCountMbrName: string

    In an attribute calculations dimension, the name to use when requesting count data. The default name is "Count."

  • defaultAverageMbrName: string

    In an attribute calculations dimension, the name to use when requesting average data. The default name is "Avg."

  • defaultMinMbrName: string

    In an attribute calculations dimension, the name to use when requesting minimum data. The default name is "Min."

  • defaultMaxMbrName: string

    In an attribute calculations dimension, the name to use when requesting maximum data. The default name is "Max."

enableMemberType: true|false Optional. If true, enables typed measures for this outline.
autoConfigure: true|false Optional. If true, automatically configures the dimension storage (as dense or sparse) when a block-storage outline is saved.

mbrUpdate

Use this action to change member properties.

Object (JSON) or Element (XML) Details
thisMbr: mbrName Required. The member that is the focus of this operation.
mbrInfo Member information you can update. Options include:
  • category - Dimension category. Valid only for dimensions and attribute members. Can be one of the following: ACCOUNT | ATTRIBUTE | COUNTRY | NONE | TIME
  • attDataType - The type and value of attribute members. BOOL | STRING | DATETIME | DOUBLE
  • dataStorage - Data storage property for the member. Options: STORE_DATA | DYNAMIC | NEVER_SHARE | LABEL_ONLY
  • timeBalance - Time balance property indicating how to calculate data in the Accounts dimension. Default is NONE. NONE | FIRST | LAST | AVG
  • skip - Time balance skip option. Valid only for members of the Accounts dimension for which timeBalance property is not NONE. NONE | MISSING | ZERO | BOTH
  • consolidation - Member consolidation operator. + | - | / | % | * | ^ | ~
  • hierarchyType - Defines the type of aggregate storage outline hierarchy, based on the generation. For generation 1 members, options are:
    • STORED, indicating a single stored hierarchy
    • DYNAMIC, indicating a single dynamic hierarchy
    • MULTI_HIERARCHY, indicating that alternate hierarchies are enabled

    For generation 2 members, options are:

    • STORED, indicating this is a stored sub hierarchy
    • DYNAMIC, indicating this is a dynamic sub hierarchy
  • prototypeMbr: mbrName - In non-unique member name outlines, specifies the referenced member for a shared member.
  • solveOrder: number - You can set solve order for dimensions or members, or you can use the default solve order. The minimum solve order you can set is 0, and the maximum is 127. A higher solve order means the member is calculated later; for example, a member with a solve order of 1 is solved before a member with a solve order of 2. Members that are not assigned a solve order are assigned the solve order of their dimension.
  • alias: - Can repeat up to 56 times. {
    • aliasTable: name,
    • alias: value
    }
  • formula: mbrFormula - Member formula. Formulas calculate relationships between members in the outline.
  • udas - Update or remove user-defined attributes
    • remove: true | false - remove UDAs in this update?
    • replace: true | false - replace UDAs in this update?
    • name: value - name and value of UDA to update
  • mbrId: mbrId - unique member ID
  • aggLevelUsage: property - View selection properties, applicable only to aggregate storage. Properties can be:
    • DEFAULT - On primary hierarchies, consider all levels. Do not aggregate secondary hierarchies unless alternate rollups are enabled.
    • NONE - Do not aggregate along this hierarchy. All views selected are at the input level.
    • BOTTOM - Applies only to secondary hierarchies. Consider only lowest level of this hierarchy for aggregation.
    • TOP - Applies only to primary hierarchies. Consider only topmost level of this hierarchy for aggregation.
    • BOTTOMTOP - Applies to primary hierarchies. Select top and bottom levels only, never aggregating to intermediate levels.
  • type - Attribute type. Attribute dimensions have a text, numeric, Boolean, or date type that enables different functions for grouping, selecting, or calculating data. Although assigned at the dimension level, the attribute type applies only to level 0 members of the attribute dimension.
    • NUMERIC
    • TEXT
    • DATE
  • comment: string - Member comment
  • commentEx: string - Extended member comment
  • formatStr - A format string, defined using the MDXFormat directive. Requires otlUpdate > enableMemberType to be true.

    Example (JSON):

    "formatStr" : "MdxFormat(IIF(CellValue() < 0, 'Negative','Positive'))"

    Example if using XML (requires some escape characters in the string):

    <formatStr>MdxFormat(IIF(CellValue() &lt; 0,
          &quot;Negative&quot;,&quot;Positive&quot;))</formatStr>
  • mbrsmartlist - Name of an existing text list object to associate with this member. Requires otlUpdate > enableMemberType to be true (the Essbase outline is enabled for typed measures).
  • twoPassCalc: true | false - Whether member is tagged for two-pass calculation
  • expense: true | false - Whether member is tagged as Expense type
isMbrId: true | false Optional. If true, member specification objects for this action are passed using member IDs. A member ID is a unique key that identifes a member in an outline.

mbrAdd

Use this action to add a member.

Object (JSON) or Element (XML) Details
mbrInfo Optional. Member information, as defined in mbrUpdate.
mbrName: mbrName Required. Member name.
parent: mbrName Required. Parent of the member being added.
preSibling: mbrName Optional. Previous sibling of the member being added. If omitted, the new member is added the first child of the parent.
isMbrId: true | false Optional. If true, member specification objects for this action are passed using member IDs. A member ID is a unique key that identifes a member in an outline.

mbrDelete

Use this action to remove members (including dimensions).

Object (JSON) or Element (XML) Details
thisMbr: mbrName Required. The member that is the focus of this operation.
isMbrId: true | false Optional. If true, member specification objects for this action are passed using member IDs. A member ID is a unique key that identifes a member in an outline.

mbrRename

Use this action to rename members (including dimensions).

Object (JSON) or Element (XML) Details
thisMbr: mbrName Required. The member that is the focus of this operation.
mbrName: mbrName Required. New member name.
isMbrId: true | false Optional. If true, member specification objects for this action are passed using member IDs. A member ID is a unique key that identifes a member in an outline.

mbrMove

Use this action to move members.

Object (JSON) or Element (XML) Details
thisMbr: mbrName Required. The member that is the focus of this operation.
parent: mbrName Required. Parent of the member (in its new location).
preSibling: mbrName Optional. Previous sibling of the member (in its new location). If omitted, the member is added as the first child of the parent.
isMbrId: true | false Optional. If true, member specification objects for this action are passed using member IDs. A member ID is a unique key that identifes a member in an outline.

mbrAssoc

Use this action to make or remove member attribute associations.

Object (JSON) or Element (XML) Details
thisMbr: mbrName Required. The member that is the focus of this operation.
attrDim: dimName Required. Name of the attribute dimension.
attrMbr: mbrName Required. Name of the attribute member to associate (or disassociate) with the base member.
remove: true | false Optional. If true, this action removes an attribute association instead of adding it. The default is false.
isMbrId: true | false Optional. If true, member specification objects for this action are passed using member IDs. A member ID is a unique key that identifes a member in an outline.

dimAdd

Use this action to add a dimension.

Object (JSON) or Element (XML) Details
properties Optional dimension properties.
  • category - information type of the dimension. Options: NONE | ACCOUNT | TIME | ATTRIBUTE
  • storage - dimension storage type. Options: DENSE | SPARSE
  • dimSolveorder: n - The solve order of the dimension. You can set solve order between 0 and 127 to indicate the priority in which the dimension is calculated. Higher solve order is calculated later.
  • attDataType - The attribute dimension type. Options: BOOL | STRING | DATETIME | DOUBLE
  • genName: [Generation naming specification (optional).]

    To ease report maintenance, you can assign a name to a generation or level and then use the name as a shorthand for all members in that generation or level. Because changes to an outline are automatically reflected in a report, when you use generation and level names, you do not need to change the report if a member name is changed or deleted from the database outline.

    • name: genName - Generation name.
    • number: genNum - Generation number.
    • nameUnique: true | false - Optional.

      When duplicate member names are enabled in a dimension, you can tag particular generations or levels within the dimension as unique. If a member is assigned conflicting properties, the unique property takes precedence. The default is false.

    • remove: true | false - Optional. If true, this action removes a generation name instead of adding it. The default is false.
  • levName: [Level naming specification (optional).]
    • name: levName - Level name.
    • number: levNum - Level number.
    • nameUnique: true | false - Optional.

      When duplicate member names are enabled in a dimension, you can tag particular generations or levels within the dimension as unique. If a member is assigned conflicting properties, the unique property takes precedence. The default is false.

    • remove: true | false - Optional. If true, this action removes a level name instead of adding it. The default is false.
  • dataMember: mbrName - Name of a member in the new dimension that will receive the data values when the outline is restructured. If omitted, the dimension member itself is used. To edit the dataMember, keepTransaction must be set to true in the path parameters.
  • nameUnique: true | false - Optional.
  • compression: true | false - Optional. If true, set this dimension as the compression dimension (valid for aggregate storage cubes only).

    By default, the compression dimension is the Accounts dimension. Changing it triggers a full restructure. The compression dimension must be a single, dynamic hierarchy. An attributes dimension or a dimension which is the base for attributes cannot be a compression dimension.

dimName: dimName Name of the dimension.
preSibling: dimName Optional. Previous sibling of the dimension being added.

smartListAdd, smartListUpdate

Use these actions to add or update a text list object. Text list objects are a way to store metrics as textual values, when your accounts dimension is designed to work with text measures. You can implement text measures when your outline is enabled to work with typed measures.

Object (JSON) or Element (XML) Details
smartlistitem All elements are required.
  • smartlistIDTextPair: [
    • smartListID: textListID
    • smartListText: textListValue
    ]
  • smartListMissingName: nameforMissing
  • smartListOutOfRangeName: nameforOutOfRange
smartListName Name of the text list to add or update.

JSON Example

{
  "editActions" : 
   [
     { "otlUpdate" :
	{
        "enableMemberType" : "true"
	}
     },
     { 
      "smartListAdd" :
      {
        "smartListName": "Customer Satisfaction Level",
        "smartlistitem": {
           "smartListMissingName": "No Data",
           "smartListOutOfRangeName": "Invalid Range",
           "smartlistIDTextPair": [
            {
               "smartListID": "1",
               "smartListText": "High"
            },
            {
               "smartListID": "2",
               "smartListText": "Medium"
            },
            {
               "smartListID": "3",
               "smartListText": "Low"
            }
           ]
       }
      }
     }
   ]
}

smartListDelete

Use this action to remove a text list.

Object (JSON) or Element (XML) Details
smartListName Name of the text list to remove.

JSON Example

{
  "editActions" : 
   [
     { 
      "smartListDelete" :
      {
        "smartListName": "Customer Satisfaction Level"
      }
     }
   ]
}

dimUpdate

Use this action to change a dimension's name or properties.

Object (JSON) or Element (XML) Details
properties Dimension properties, as defined in dimAdd.
dimName: dimName Name of the dimension.

dimAssoc

Use this action to make or remove dimension attribute associations.

Object (JSON) or Element (XML) Details
dimName: dimName Name of the dimension.
attrDim: dimName Required. Name of the attribute dimension.
remove: true | false Optional. If true, this action removes an attribute association instead of adding it. The default is false.

markForDelete

Use this action to mark previous member additions in a dimension for deletion. They will be deleted when you use deleteMarked.

Object (JSON) or Element (XML) Details
dimName: dimName Name of the dimension.

Follow this workflow to mark and delete members in batch outline editing scripts:

  1. Add a new dimension, Dim1, to a sample cube.
  2. To Dim1,

    • Add mbrA.
    • Add mbrB.
    • Add mbrC.
    • Add mbrD.
  3. Mark all previously added members for deletion.

  4. Add mbrC and mbrD again.

  5. Delete marked members.

    Result:

    Dim1
     +-mbrC
     +-mbrD

JSON Example

{
  "editActions" : 
   [
     { "dimAdd" : 
       {
         "dimName" : "Dim1"
       }
     },
     { "mbrAdd" : 
       {
         "mbrName" : "mbrA",
         "parent" : "Dim1"
       }
     },
     { "mbrAdd" : 
       {
         "mbrName" : "mbrB",
         "parent" : "Dim1",
         "preSibling" : "mbrA"
       }
     },
     { "mbrAdd" : 
       {
         "mbrName" : "mbrC",
         "parent" : "Dim1",
         "preSibling" : "mbrB"
       }
     },
     { "mbrAdd" : 
       {
         "mbrName" : "mbrD",
         "parent" : "Dim1",
         "preSibling" : "mbrC"
       }
     },
     { "markForDelete" :
       {
         "dimName" : "Dim1"
       }
	 },
     { "mbrAdd" : 
       {
         "mbrName" : "mbrC",
         "parent" : "Dim1",
         "preSibling" : "mbrB"
       }
	 },
     { "mbrAdd" : 
       {
         "mbrName" : "mbrD",
         "parent" : "Dim1",
         "preSibling" : "mbrC"
       }
	 },
     { "deleteMarked" :
       {
         "dimName" : "Dim1"
       }
     }
   ]
}

deleteMarked

Use this action to delete marked member additions. See markForDelete for the workflow and example.

Object (JSON) or Element (XML) Details
dimName: dimName Name of the dimension.

sortChildren

Use this action to sort a hierarchy.

Object (JSON) or Element (XML) Details
mbrName: mbrName Required. Member name.
sortOption ASCENDING or DESCENDING
sortRecursive Include all descendants in the sort. The default is true.
isMbrId: true | false Optional. If true, member specification objects for this action are passed using member IDs. A member ID is a unique key that identifes a member in an outline.
JSON Example
{
  "editActions" : [
     { "dimAdd" : 
       {
         "dimName" : "Dim1"
       }
     },
     { "mbrAdd" : 
       {
         "mbrName" : "mbrA",
         "parent" : "Dim1"
       }
     },
     { "mbrAdd" : 
       {
         "mbrName" : "mbrB",
         "parent" : "Dim1",
         "preSibling" : "mbrA"
       }
     },
     { "sortChildren" :
       {
         "mbrName" : "Dim1",
         "sortOption" : "DESCENDING",
         "sortRecursive" : "false"
       }
     }
   ]
}

Result

Dim1
 +-mbrB
 +-mbrA

Script with cURL Command

The calling user's ID and password are variables whose values are set in properties.bat.

The cURL command submits the outline editing directives from the JSON file outline_edits.json.

call properties.bat
curl -X POST "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/boe" -H Accept:application/json -H Content-Type:application/json --data "@./outline_edits.json" -u %User%:%Password%

Example of JSON Object

This example shows the outline editing instructions in JSON format (the outline_edits.json file posted above).

{
  "editActions" : [
     { "otlUpdate" :{
                     "enableMemberType" : "true",
                     "dateFormatValue" : "dd Month yyyy" 
                    }
     },
     { "mbrUpdate" :{
                     "thisMbr" : "Product",
                     "mbrInfo" : {
                        "category" : "NONE",
                        "solveOrder" : "5",
                        "consolidation" : "+",
                        "comment" : "Member Comment",
                        "twoPassCalc" : "false"
                     },
                     "isMbrId" : "false"
                    }
     },
     { "mbrUpdate" :{
	   					
                     "thisMbr" : "Sales",
		     "mbrInfo" : {
				  "formatStr" : "MdxFormat(IIF(CellValue() < 0, 'Negative','Positive'))"
				 },
                     "isMbrId" : "false"
		    }
	 },
     { "mbrAdd" :{
                     "mbrName" : "YTDSales",
                     "parent" : "Margin",
		     "preSibling" : "COGS",
		     "mbrInfo" : {
				 "formula" : "@ACCUM(Sales);"
				 },
                     "isMbrId" : "false"
                    }
     },
     { "mbrRename" :{
		     "thisMbr" : "YTDSales",
                     "mbrName" : "YTD_Sales",
                     "isMbrId" : "false"
                    }
     }

   ]
}
Back to Top