Modeled Sheet Definition
URL Endpoint
HTTPS://api.adaptiveplanning.com/api/rest/modeling/<version>/<tenant>/sheet/modeled/definition
Version: v1
Category | Data submission |
Description | Metadata Modification |
Permissions Required to Invoke | |
Parameters Required on Request | name |
Supported HTTP VERB(s)
HTTP Verb | Single Resource | Collection Resource | Description |
|---|---|---|---|
PATCH
| Supported | Not Supported | Insert or Update a modeled sheet definition |
DELETE
| Supported | Not Supported | Delete modeled sheet definition |
POST
| Supported | Not Supported | Validation mode for modeled sheet definition upsert. |
OPTIONS
| Supported | Not Supported | Returns the list of HTTP verbs supported for this collection resource. |
PATCH
- Request URI
- /sheet/modeled/definitionUpdate the modeled sheet definition matching the provided query parameter.If a sheet with the matching identifier does not exist, a new modeled sheet will be created with the given properties.Sample Request by Namehttps://api.adaptiveplanning.com/api/rest/modeling/v1/globosales/sheet/modeled/definition?name=Capital ModelSample Request HeaderAccept-Language: enSample Request BodySee Request Body sectionQuery ParametersNameDescriptionRequiredinstanceCodeThe instanceCode to retrieve values from. For example, GLOBO. If no instanceCode is specified, the default instance of the user is used.NnameThe name of the sheet.NproceedWithWarningsWhether the upsert should ignore any warning validation, usually returned when a changed sheet property could delete data from the sheet.NreorderColumnsSetting this query parameter to true will change the order of the column list to reflect the ordering of columns given in the api request body. By default this is set to false. See Reference: Re-ordering Columns for Modeled and Cube Sheet Definition JSON APIs.N
- Request Body
- Sample Request BodyThe same modeled sheet definition format is used as the JSON payload for both endpoints.Request Format{ "properties": { "description": "Capital Model", "prefix": "Capital" }, "columns": [ { "properties": { "code": "Base Pay", "name": "Base Pay", "type": "TEXT_SELECTOR", "values": ["value1", "value2"], "lookupTables": [ { "name": "valueLookup1", "type": "VALUE", "decimalPrecision": 1, "displayAs": "CURRENCY" }, { "name": "spreadLookup1", "type": "SPREAD", "decimalPrecision": 0, "displayAs": "NUMBER" } ] }, "availability": [ { "name": "100k", "code": "100k", "available": true } ], "defaultAvailability": false, "defaultActionIfDataIsPresent": "delete" }, { "properties": { "code": "Label", "name": "Label", "type": "TEXT" }, "delete": true } ], "accounts": [ { "name": "AccountName", "code": "AccountCode" } ], "accessibility": { "usernames": [ "test@greenco.com" ], "excludedFromWorkflow": true } }Sheet definition objectNameDescriptionRequiredpropertiesObject containing general sheet propertiesNcolumnsList of modeled sheet column objects.New columns will be created at the end of the sheet definition, and the relative order of new columns will be respected.Existing columns will only be updated in-place; they will not be reordered.NaccountsList of account objectsNaccessibilityObject containing defining user-assigned sheet accessibility.NSheet properties objectNameDescriptionRequiredTypeDefaultdescriptionSheet description.NstringEmpty stringcodeSheet code used to prefix account codes and a secondary unique identifier. Required when creating a new sheet.NstringprefixSheet prefix used for the account code. Required when creating a new sheet. Deprecated in favor of code.NstringuserAssignedWhether the sheet is a user-assigned sheet or (by default) a level-assigned sheet.NbooleanfalsesalaryDetailWhether the sheet contains salary detail.NbooleanfalsefrozenColumnCountNinteger0allowSplitsWhether the sheet allows split rows.NbooleanfalseallowRollupModelEditsWhether the sheet allows edits while viewing rollup levels.NbooleanfalseallowActualsWhether the sheet is available in actuals versions.NbooleanfalserecalculateOnDemandWhether recalculate on demand is enabled for the sheet.NbooleanfalsetimeStratumCodeThe time stratum code associated with the data in the sheet.NstringGL Time StratumSheet column objectNameDescriptionRequiredTypeDefaultpropertiesObject containing sheet column properties.YobjectavailabilityList of sheet availability objects for the current column. See Sheet Availability for details on the list format.NlistdefaultAvailabilityThe default availability to apply to all values, unless otherwise specified in availability. Valid for level and dimension columns.For dimension columns, if no availability or defaultAvailability is specified, then defaultAvailability will be set to true for new columns.By default, this value will be empty, which means the existing availability is preserved unless specifically changed via availability.NbooleandefaultActionIfDataIsPresentThe default action if data is present when deleting a value, unless otherwise specified in availability. Valid for dimension columns.Required when the Default Availability is false for existing columns.NstringdeleteRequest to delete column from the given sheet. Not valid for columns that are dependent on existing columns that are not flagged for deletion (such as dimension attributes).NbooleanSheet columns properties objectNameDescriptionRequiredTypeDefaultnameColumn name.NstringcodeThe column code. Required for all columns except level and level currency columns.YstringtypeThe type of column.Possible values: LEVEL, DIMENSION, LEVEL_ATTRIBUTE, DIMENSION_ATTRIBUTE, TIMESPAN, NUMBER, DATE, TEXT, TEXT_SELECTOR, LEVEL_CURRENCY, DISPLAY, INITIAL_BALANCE, CHECKBOXYstringreadOnlyWhether the current column is read only or not. For dimension attribute columns, set readOnly to false to use the attribute as a filter on the dimension.Required to be true (and defaults to true) for level attributes and display columns.NbooleanfalseallowSplitsWhether the current column is splittable. Only valid for sheets when the general allowSplits property is true.NbooleanfalseshowTotalsAtBottomWhether to show totals at the bottom of the sheet for this column.NbooleanfalseallowHiddenWhether this column can be hidden from the sheet viewer in Display Options. Valid for all columns except text selector and timespan columns.NbooleantrueeditableOnSheetWhether new values can be added to the dimension column from the sheet. Only valid for dimension and text selector columns.NbooleanfalserequiredWhether each row is required to have a value in this column. Only valid for dimension columns where allowHidden is false.NbooleanfalserecalculateOnMatchWhether to recalculate values on match. Only valid dimension and text selector columns for sheets where recalculateOnDemand is true.NbooleanfalselookupTablesList of LookupTable objects to define spread and value lookups. Only valid for dimension and text selector columns.NLookupTablenullvaluesList of strings to add as text selector values. Only valid for text selector columns.Nstring arraynullrowKeyWhether this column can be used as a Row Key. Only valid for text driver columns.NbooleanfalsedisplayAsThe Display As format for the column. Only valid for numeric driver columns.Possible values: NUMBER, PERCENT, CURRENCYNDisplayAsfalsedecimalPrecisionThe decimal precision to display. Only valid for numeric driver columns.Possible values: 0 to 9, or -1 to use the currency precision when displayed as CURRENCY.Ninteger0showToggleWhether to show a checkbox column as a toggle. Only valid for checkbox columns.NbooleanfalseshowInEditModeWhether to show the column on editable rows of the modeled sheet. Only valid for level currency columns.NbooleanfalsereferenceTimePeriodIndicates the reference time period for a display column. Only valid for account display columns.Possible values: FIRST_NON_ACTUALS_PERIOD, START_OF_PLANNstringFIRST_NON_ACTUALS_PERIODstartOfRollupRangeIndicates where to start a time period rollup range for a display column. Only valid for account display columns.Possible values: CONTAINING_REFERENCE_PERIOD, BEFORE_REFERENCE_PERIOD, AFTER_REFERENCE_PERIODNstringCONTAINING_REFERENCE_PERIODtimePeriodsInRollupRangeNumber of time periods to include in the rollup range for a display column. Only valid for account display columns.Ninteger1startOfRollupRangeTimeStratumCodeCode of the time period to determine the start of the rollup range for a display column. Only valid for account display columns. Possible values include time strata equal to or higher than the sheet time stratum.NstringSheet time stratumaccountCodeCode of the account to determine the modeled account for a display column. Only valid for display columns. Only valid values are accounts on the given modeled sheetNstringSheet column lookup table objectNameDescriptionRequiredTypeDefaultnameLookup table name.YstringdisplayAsThe Display As format for this lookup table. Possible values: NUMBER and PERCENT. Only valid for value lookup tables.NstringNUMBERdecimalPrecisionThe decimal precision for values in this lookup table. Possible values: 0 to 9.Ninteger0typeThe type of lookup table. Possible values: VALUE, SPREAD.YstringSheet account objectFor more detail, see Reference: Properties in Account JSON Import PayloadNameDescriptionRequirednameThe account name.YcodeThe account code.YparentThe parent account.NdescriptionThe account description.NisCumulativeReturns whether the account is cumulative.NisActualsByDeltaReturns whether the acount is actuals by delta.NisLinkReturns whether the account is a linked account or not.NtimeRollupTypeThe type of rollup to perform for time rollups.NtimeWeightAccountThe weight account used for time rollups.NlevelDimRollupTypeThe type of rollup to perform for level/custom dimension rollups.NlevelDimWeightAccountThe weight account used for leve/custom dimension rollups.NlevelDimRollupTextThe rollup text vlaue used in level/custom dimension rollups.NactualsOverlayThe actuals overlay setting for the account.NattributeValuesList of accoun attribute value objects for this account.NdisplayAsThe display as setting for the account.NformulaThe account formula.NweightedAverageTranslationsEnabledReturns whether the account is weighted average translations enabled.NweightedAverageTranslationResetStratumThe WAT Rest Stratum for this account.NweightedAverageTranslationTransferAccountThe WAT Transfer Account for this account.NdecimalPrecisionThe default decimal precision for the account.NexchangeRateTypeThe exchange rate type for this account.NsuppressZerosReturns whether the zero rows should be suppressed for the account on sheets.NstartExpandedReturns whether the account starts expanded on the sheet.NdataEntryTypeThe data entry type setting for this account.NdataPrivacyThe data privacy setting for this account.NhasSalaryDetailReturns whether the account has salary details or not.NisBreakbackEligibleReturns whether break-back is eligible for this account.NisSystemAccountReturns whether this account is a system account or not.NisIntercompanyReturns whether this is an intercompany account or not.NisAssumptionReturns whether the account is an assumption or not.NisMetricReturns whether the the account is a metric account or not.NmodeledSheetSpreadCodeThe modeled sheet spread code for the associated model spread.NspreadTargetAccountThe target account object of the spread account.NSheet accessibility objectNameDescriptionRequiredTypeDefaultusernamesList of usernames to add to the sheet.Must come in the form of valid email addresses.Nstring arrayexcludedFromWorkflowupdates theExcluded From Workflowcheckbox in the sheet accessibility settingsNbooleanfalse
- Sample Response
- 204Successful repsonse is blank with status code 204.
DELETE
- Request URI
- /sheet/modeled/definitionDelete the modeled sheet definition matching the given query parameter. If a sheet with the matching identifier does not exist, then not found error will occur.Sample Request by Namehttps://api.adaptiveplanning.com/api/rest/modeling/v1/globosales/sheet/modeled/definition?name=Capital ModelSample Request HeaderAccept-Language: enSample Request Body<None>Query ParametersNameDescriptionRequirednameThe name of the modeled sheet.NinstanceCodeThe instanceCode to retrieve values from. For example, GLOBO. If no instanceCode is specified, the default instance of the user is used.N
- Sample Response
- 204Successful response is blank with status code 204.
POST
- Request URI
- /sheet/modeled/definition/validateValidate a modeled sheet definition request.Sample Request by Namehttps://api.adaptiveplanning.com/api/rest/modeling/v1/default/sheet/modeled/definition/validate?name=My SheetSample Request HeaderAccept-Language: enSample Request Body<Documented below>Query ParametersSee relative endpoint being validated (i.e. PATCH).
- Request Body
- Sample Request BodyThe same modeled sheet definition format is used as the JSON payload for the endpoint being validated. However, the objectvalidationOptionsis required in the payload when sending a validation request.Request Format{ "validationOptions": { "httpMethod": "Patch", "dependentDimensions": [ "MyTestDim1", "MyTestDim2" ], "dependentAttributes": [ { "attributeName": "MyTestAttr1", "attributeType": "DIMENSION_ATTRIBUTE", "dimensionName": "MyTestDim2" }, { "attributeName": "MyTestAttr2", "attributeType": "LEVEL_ATTRIBUTE" } ] }, "properties": { "description": "Capital Model", "prefix": "Capital" }, "columns": [ { "properties": { "code": "Base Pay", "name": "Base Pay", "type": "TEXT_SELECTOR", ...Validation Options ObjectNameDescriptionRequiredhttpMethodSpecifies which modeled sheet API endpoint is being validated. Currently supports the following endpoints:
- PATCH
YdependentDimensionsList of dimension names to be assumed existent for validation. Dimensions aren't persisted as a result of the validation request. It is assumed all dependent custom dimensions are flat.NdependentAttributesList of dependent attribute objects. Attributes aren't persisted as a result of the validation request.NDependent Attribute ObjectNameDescriptionRequiredattributeNameName of the dependent attribute.YattributeTypeType of the dependent attribute. Supported types are:- LEVEL_ATTRIBUTE
- DIMENSION_ATTRIBUTE
YdimensionNameName of the dimension for the dependent attribute. Only applies and is required for dimension attributes. Not allowed for level attributes.N