eraseData
Supported in API v24 +.
Category |
Data submission |
Description |
Erases plan or actuals data in the specified time periods for an account with optional filters for levels and accounts. |
Permissions Required To Invoke |
EraseActuals |
Parameters Required On Request |
Credentials, EraseOptions |
Erases numeric values from a plan or actuals version for the specified set of accounts for a given time frame. It will not erase any formulas (such as shared formulas, cell formulas, account formulas). It deletes those account splits that become empty as a result of the erase process. An empty split is a split that contains no data, formulas, or cell notes. If erasing results in the deletion of the last data from a split, that split will be deleted. This API leaves splits untouched if they were empty prior to calling the API.
The eraseData method provides the same capabilities as eraseActuals but also includes the ability to erase plan data, with additional control over specific account-plan combinations that are targets. Cell notes matching the criteria will also be deleted.
Request Format
Erase Actuals for All Levels of the Default Actuals Version
To erase numeric values and newly-empty splits for the time periods between the start and the end from all general ledger accounts for all levels of the default actuals version:
<?xml version="1.0" encoding="UTF-8"?> <call method="eraseActuals" callerName="a string that identifies your client application"> <credentials login="sampleuser@company.com" password="my_password" instanceCode="MYINSTANCE" locale="en_US"/> <eraseOptions actualsVersionName="Actuals" accountType="GL" start="01/2013" end="03/2013" includeCellNotes="false"> </eraseOptions> </call>
To erase numeric values and cell notes from a single cube sheet for all levels of a specific actuals version between the specified start and end:
<?xml version="1.0" encoding="UTF-8"?> <call method="eraseActuals" callerName="a string that identifies your client application"> <credentials login="sampleuser@company.com" password="my_password"/> <eraseOptions actualsVersionName="Actuals" accountType="CUBE" cubeSheetName="Sales Cube" start="01/2013" end="03/2013" includeCellNotes="true" /> </eraseOptions> </call>
Erase Actuals Data with Filters for Accounts on a Specific Level
For this example, actuals data in the actuals version ActualsSubVersion2013
for custom accounts WAT_Input_Custom
and WAT_Test_Custom
on the level QA
will be deleted.
<?xml version="1.0" encoding="UTF-8"?> <call method="eraseData" callerName="test caller api name"> <credentials login="sampleuser@company.com" password="my_password" instanceCode="MYINSTANCE" locale="en_US" /> <eraseOptions actualsVersionName="ActualsSubVersion2013" accountType="CUSTOM" start="12/2009" end="11/2010" includeCellNotes="true"> <filters> <Accounts> <Account code="WAT_Input_Custom"/> <Account code="WAT_Test_Custom"/> </Accounts> <Levels> <Level name="QA"/> </Levels> </filters> </eraseOptions> </call>
Erase Plan Data with a Filter to Delete from Specific Custom Accounts
For this example, the plan data in the plan version clone2013Budget
for custom accounts SUM_TEXT
and LAST_NB
will be deleted.
<?xml version="1.0" encoding="UTF-8"?> <call method="eraseData” callerName="a string that identifies your client application"> <credentials login="sampleuser@company.com" password="my_password" instanceCode="MYINSTANCE1" locale="en_US"/> <eraseOptions planVersionName="clone2013budget" accountType="CUSTOM" start="01/2013" end="12/2013" includeCellNotes="true"> <filters> <Accounts> <Account name="SUM_TEXT"/> <Account name="LAST_NB"/> </Accounts> </filters> </eraseOptions> </call>
Erase Plan Data with Filters to Delete from Specific Custom Accounts on Specific Levels
For this example, the plan data in the plan version clone2013Budget
for custom accounts WA_SUM
and SUM_SUM
on the levels Development
and Hosting
will be deleted.
<?xml version="1.0" encoding="UTF-8"?> <call method="eraseData" callerName="test caller api name"> <credentials login="sampleuser@company.com" password="my_password" instanceCode="MYINSTANCE1" locale="en_US"/> <eraseOptions planVersionName="clone2013Budget" accountType="CUSTOM" start="01/2013" end="12/2013" includeCellNotes="true"> <filters> <Accounts> <Account name="WA_SUM"/> <Account name="SUM_SUM"/> </Accounts> <Levels> <Level name="Development"/> <Level name="Hosting"/> </Levels> </filters> </eraseOptions> </call>
Erase Plan Data with Filters to Delete from a Specific Cube Account on a Specific Level
For this example, the plan data in the plan version 10YearBudget
for cube account ExpenseCube.Units
in the level WorldWide Sales
will be deleted.
<?xml version="1.0" encoding="UTF-8"?> <call method="eraseData" callerName="test caller api name"> <credentials login="sampleuser@company.com" password="my_password" instanceCode="MYINSTANCE1" locale="en_US" /> <eraseOptions planVersionName="10YearBudget" accountType="CUBE" cubeSheetName="Expense Cube" start="01/2011" end="12/2017" includeCellNotes="true"> <filters> <Accounts> <Account name="ExpenseCube.Units" /> </Accounts> <Levels> <Level name="WorldWide Sales" /> </Levels> </filters> </eraseOptions> </call>
credentials element |
|||
Tag Name |
credentials |
||
Description |
All API calls must contain a single credentials element to identify the user invoking the API. The API call is then performed as this user (any audit trail or history of actions in the system will show that this user performed the action), and therefore the user must have the required permissions to perform the action in order for the API call to succeed. |
||
Attributes of the Element |
|||
Attribute Name |
Required? |
Value |
Example |
login |
Y |
The login name of the user invoking the API method. This user must have a role containing the permissions required for the method being invoked. |
sampleuser@company.com |
password |
Y |
The password of the user invoking the API method. |
my_password |
locale |
N |
Specify the locale to be used to interpret incoming numbers and dates, and to format outgoing numbers and dates (using the proper thousands separator, time period names, and date formatting). The locale is also used to specify the language in which any system messages in the response should appear. If not specified, en_US (American English) is used. |
fr_FR |
instanceCode |
N |
If the user specified in the credentials has access to more than one instance of Adaptive Planning, this attribute can be used to specify that the user is intending to access an instance other than their default instance. If not specified, the user's default instance will be used. To determine the available instance codes, use the exportInstances API. |
MYINSTANCE1 |
Contents of the Element |
|||
(none) |
eraseOptions element |
|||
Tag Name |
eraseOptions |
||
Description |
Specifies the options used when erasing actuals or plan data. |
||
Attributes of the Element |
|||
Attribute Name |
Required? |
Value |
Example |
actualsVersionName |
N |
Required for erasing Actuals data. Specifies the name of the actuals version to erase data from. Does not erase any formulas (such as shared formulas, cell formulas, account formulas). |
ActualsSubVersion2013 |
planVersionName | N |
Required for erasing Plan data. Specifies the name of the plan version to erase data from. Does not erase any formulas (such as shared formulas, cell formulas, account formulas). |
clone2013Budget |
accountType |
Y |
Specifies if account type is general ledger ("GL"), custom ("CUSTOM") or cube sheet ("CUBE"). |
GL |
cubeSheetName |
N |
Required if accountType="CUBE". Specifies the name of the cube sheet. |
Sales Cube |
start |
Y |
Specifies the code of the start time period of the time range. The code must refer to a time period at the time stratum of the account. If you specify a cube sheet, the code must refer to a time period at the time stratum of the cube sheet. If you specify a GL or custom account type, the code must refer to the default time stratum. The time period specified must align with the time stratum of the account. For example, if the account has a time stratum of Quarters starting in January, then you cannot select February as a start. |
01/2013 |
end |
Y |
Specifies the code of the end time period of the time range. The code must refer to a time period at the time stratum of the account. If you specify a cube sheet, the code must refer to a time period at the time stratum of the cube sheet. If you specify a GL or custom account type, the code must refer to the default time stratum. The time period specified must align with the time stratum of the account. For example, if the account has a time stratum of Quarters starting in January, then you cannot select February as an end. |
03/2013 |
includeCellNotes |
Y |
If set to "true", then eraseData erases all cell notes in the selected version, account type, and time range (and account-level combinations matching the filters, if they are specified), regardless of whether it also erases the data from the cell. If "false", no cell notes will be deleted |
true |
Contents of the Element |
|||
(none) |
filters element |
|||
Tag Name |
Filters |
||
Description |
Specifies the account and level filters to use when erasing data. |
||
Attributes of the Element |
|||
Attribute Name |
Required? |
Value |
Example |
Contents of the Element |
|||
One Accounts element, one Levels element, or both an Accounts element and a Levels element. |
Accounts element |
|||
Tag Name |
Accounts |
||
Description |
Container for one or more account elements of an eraseData filter. |
||
Attributes of the Element |
|||
Attribute Name |
Required? |
Value |
Example |
Contents of the Element |
|||
One or more Account elements. |
Levels element |
|||
Tag Name |
Levels |
||
Description |
Container for one or more Level elements of an eraseData filter. |
||
Attributes of the Element |
|||
Attribute Name |
Required? |
Value |
Example |
Contents of the Element |
|||
One or more Level elements. |
Account element |
|||
Tag Name |
Account |
||
Description |
The account that data will be erased from, specified by account code. |
||
Attributes of the Element |
|||
Attribute Name |
Required? |
Value |
Example |
code |
Y |
Specifies the account code for the account of the data being erased. |
WA_SUM |
Contents of the Element |
|||
(none) |
Level element |
|||
Tag Name |
Level |
||
Description |
The level for the account data being erased, specified by Level name. |
||
Attributes of the Element |
|||
Attribute Name |
Required? |
Value |
Example |
name |
Y |
Specifies the level name for the account data being erased. |
World Wide Sales |
Contents of the Element |
|||
(none) |
Response Format
<?xml version="1.0" encoding="UTF-8"?> <response success="true"> <messages> <message key="erase-actuals-success">Successfully erased actuals data.</message> <message key="erase-actuals-facts-deleted">4 facts deleted.</message> <message key="erase-actuals-notes-deleted">2 notes deleted.</message> <message key="erase-actuals-splits-deleted">1 splits deleted.</message> </messages> </response>
response element |
|||
Tag Name |
response |
||
Attributes of the Element |
|||
Attribute Name |
Required? |
Value |
Example |
success |
Y |
Either true or false, indicating whether the API call was successful or not. Even successful calls may contain warning messages in their response. |
true |
Contents of the Element |
|||
A single optional messages element. |
messages element |
|||
Tag Name |
messages |
||
Description |
Container for one or more message elements. |
||
Attributes of the Element |
|||
(none) |
|||
Contents of the Element |
|||
One or more message elements. |
message element |
|||
Tag Name |
message |
||
Description |
Represents a message being sent from the system back to the caller. Messages are used for error messages when requests do not succeed, for warning messages when requests do succeed, and for confirmation messages upon success. |
||
Attributes of the Element |
|||
Attribute Name |
Required? |
Value |
Example |
key |
N |
When given, a key is a way to identify a particular message or type of message, useful for purposes of automated error logging and recovery in client programs. Keys do not change under different locales of requests, even when the language of the message changes. Keys also are unlikely to change in the future due to wording adjustments or terminology changes. |
warning-invalid-timespan-start |
Contents of the Element |
|||
The text of the message. This text is in the language of the locale specified on the request (assuming that locale is supported). The text may also contain variable information such as the number of rows which were processed, or the particular column or value which caused an error. |