Saltar al contenido principal
Adaptive Planning
Última actualización: 2023-06-23
Especificación de REST customReportValues

Especificación de REST customReportValues

En esta sección se proporciona información complementaria sobre la llamada a customReportValues.

Solicitud

Ejemplo

<?xml version='1.0' encoding='UTF-8'?> <call method="customReportValues" callerName="a string that identifies your client application"> <credentials login="sampleuser@company.com" password="my_pwd" locale="fr_FR" instanceCode="INSTANCE1"></credentials> <report suppress-zeroes="1"> <axis type="X"> <segment> <tier entity-id="2" type="dim"> <el id="8" /> </tier> <tier entity-id="22" type="lAttr"> <el id="0" /> </tier> <tier type="ver"> <el id="2" /> </tier> <tier type="lvl"> <el id="2" /> </tier> <tier type="time"> <el complex-type="timespan" start="204001" end="227001" show-time="1,2,3" /> <el complex-type="ptd" as-of="207001" stratum-id="3"/> <el complex-type="ptd" as-of="207001" stratum-id="2"/> <el id="17003" /> <el id="69002" /> <el id="210001" /> </tier> </segment> </axis> <axis type="Y"> <segment> <tier entity-id="11" type="dim"> <el id="34" /> </tier> <tier entity-id="18" type="aAttr"> <el id="14" /> </tier> <tier entity-id="29" type="dAttr" > <el id="87" /> </tier> <tier type="cur"> <el id="6600" /> </tier> <tier type="acct"> <el id="1" /> </tier> </segment> </axis> </report>

Especificación de formato RNC (Relax NG compact)

A continuación se muestra el esquema de solicitud, proporcionado en el formato Relax NG Compact .
default namespace = ""
start = element call { attribute callerName { text }, attribute method { "customReportValues" }, element credentials { attribute instanceCode { text }, attribute login { text }, attribute locale { text }?, (attribute password { text } | attribute ticket{ text }) }, element report { attribute suppress-zeroes { "0" | "1" | "2" }?, #0=Nothing suppressed, 1=Suppress blank cells but not zeroes, 2=Suppress blank and zero cells(Default) attribute show-cell-notes { "0" | "1" }?, #0=Don't show cell notes(default), 1=show cell notes attribute include-element-code { "0" | "1" }?, #0=Don't add element code to the response(default), 1=add element code to the response X-axis, # Axes must be specified in order X, Y, (optional) FILTER Y-axis, Filter-axis? } }
X-axis = element axis { attribute type { "X" }, segment+ } Y-axis = element axis { attribute type { "Y" }, segment+ } Filter-axis = element axis { attribute type { "FILTER" }, segment }
segment = element segment { (dimTier | levelTier | accTier | timeTier | versionTier | currencyTier | accAttrTier | levelAttrTier | dimAttrTier)+ }
#Look up ids by calling the exportDimensions API dimTier = element tier { attribute type { "dim" }, attribute entity-id { xsd:integer }, #dimension id (stdRollup | stdEl | calcElement)+ #stdRollup will allow for arbitrary rollups and stdEl will provide the dimension value id }
#Look up ids by calling the exportLevels API levelTier = element tier { attribute type { "lvl" }, (stdRollup | stdEl | calcElement)+ #stdRollup will allow for arbitrary rollups and stdEl will provide the dimension value id }
#Look up ids by calling the exportAccounts API accTier = element tier { attribute type { "acct" }, (acctRollup | acctEl | calcElement)+ #acctRollup will allow for arbitrary rollups and acctEl will provide the account id }
#Look up ids by calling the exportTime API timeTier = element tier { attribute type { "time" }, (timeRollup | timeEl | calcElement)+ #timeRollup will allow for arbitrary rollups of single time elements }
#Look up ids by calling the exportVersions API versionTier = element tier { attribute type { "ver" }, (verRollup | verdEl | calcElement)+ }
#Look up ids by calling the exportActiveCurrencies API currencyTier = element tier { attribute type { "cur" }, stdEl+ }
#Look up ids by calling the exportAttributes API accAttrTier = element tier { attribute type { "aAttr" }, attribute entity-id { xsd:integer },#account attribute id (stdRollup | stdEl | calcElement)+ #stdRollup will allow for arbitrary rollups and stdEl will provide the account attribute value id }
#Look up ids by calling the exportAttributes API levelAttrTier = element tier { attribute type { "lAttr" }, attribute entity-id { xsd:integer }, #level attribute id (stdRollup | stdEl | calcElement)+ #stdRollup will allow for arbitrary rollups and stdEl will provide the level attribute value id }
#Look up ids by calling the exportAttributes API dimAttrTier = element tier { attribute type { "dAttr" }, attribute entity-id { xsd:integer }, #dimension attribute id (stdRollup | stdEl | calcElement)+ #stdRollup will allow for arbitrary rollups and stdEl will provide the dimension attribute value id }
#All tiers except account and time have stdEl stdElAttributes = attribute id { xsd:integer }, attribute code { text }?, attribute element-id { text }?, attribute suppress-elt-rollup { "0" | "1" }?, attribute start-expanded { text }? stdEl = element el { stdElAttributes, # R=Rollup or Leaf (as appropriate) (default) # U=Uncat # C=Me & my immediate Children(not valid with arbitrary rollup) # D=Descendants # X=Me & the immediate children of the specified descendants in start-expanded attribute rollup-mode { "R" | "U" | "C" | "D" | "X" }?, } calcElement = (stdRollup | subTotal | difference | customCalc) stdRollup = element rollup { attribute code { text }?, stdEl+ }
subTotal = element subtotal { attribute code { text }? }
difference = element diff { attribute operand-a { xsd:integer }, attribute operand-b { xsd:integer }, attribute code { text }?, ( attribute display-as { "0" | "1" | "2" } | # 0=show using account's display type (default), 1=show as value, 2=show value as a percent attribute reverse-sign { "0" | "1" } # 0=do not reverse any signs (default), 1=Reverse sign for Expenses, Liabilities, and Equities )? }
customCalc = element calc { # this is the human-readable formula as authored in the web UI, # It works with [ID] of elements as well as with Code (Rpt.Code). attribute formula { text }, attribute code { text }?, ( attribute display-as { "0" | "1" | "2" } | # 0=show using account's display type (default), 1=show as value, 2=show value as a percent. attribute reverse-sign { "0" | "1" } # 0=do not reverse any signs (default), 1=Reverse sign for Expenses, Liabilities, and Equities )? }
timeEl = (singleTimeEl | timespanEl | ptdEl) singleTimeEl = element el { attribute id { timeId }, attribute code { text }?, attribute element-id { text }?, attribute start-expanded { text }?, attribute rollup-mode { "X" }? } timespanEl = element el { attribute complex-type { "timespan" }, attribute start { timeId }?, #Not specifying start or end means start or end of the 'Range of the versions in this export'. attribute end { timeId }?, attribute show-time { comma separated list of stratum ids }, # List of stratum ids that has show time enabled. Defaults to all strata being enabled. attribute code { text }? } ptdEl = element el { attribute complex-type { "ptd" } attribute stratum-id { stratumId }, # Stratum id of the stratum used in "stratum to date" attribute as-of { timeId }, attribute code { text }? } timeRollup = element rollup { attribute code { text }?, (singleTimeEl)+ } timeId = xsd:integer # Unique time period id
acctEl = element el { stdElAttributes, ( attribute rollup-mode { "R" | "C" | "D" | "X" } | attribute show-acct-splits { "0" | "1" } #0=don't show splits in account(default), 1=show splits in accounts (not valid with arbitrary rollup) )? } acctRollup = element rollup { attribute code { text }?, acctEl+ }
verEl = element el { stdElAttributes, # R=Rollup or Leaf (as appropriate) (default) # U=Uncat # C=Me & my immediate Children(not valid with arbitrary rollup) # D=Descendants # X=Me & the immediate children of the specified descendants in start-expanded attribute rollup-mode { "R" | "U" | "C" | "D" | "X" }?, attribute offset { xsd:integer }?, attribute offset-strata { xsd:integer }? } verRollup = element rollup { attribute element-id { text }?, attribute code { text }?, verEl+ }

Supuestos

  • Las credenciales pueden ser de inicio de sesión o de ticket (como actualmente).
  • Los ejes deben especificarse en el siguiente orden: X, Y, FILTER (opcional).
  • Los valores no válidos siempre se marcarán. En la respuesta, hay un indicador de atributo no válido en la celda.
  • El marco temporal, el trimestre y el año especificados en el filtro aparecerán como rangos temporales en los filtros de la respuesta.
  • Una celda se considera en blanco si el valor de esa celda en el explorador de celdas está vacío. Las celdas que se agrupan en un valor de texto vacío no se consideran en blanco.
  • Construcción de TimeId: #Look up IDs llamando a la API exportTime.

Respuesta

Ejemplo
<?xml version="1.0" encoding="utf-8"?> <response success="true"> <messages> <message type="INFO" key="warning-invalid-timespan">Ignoring start of timespan, which precedes start of version</message> <message type="INFO" key="removed-by-qualification">Account "fred" was removed.</message> <message type="ERROR" key="exception-happened">Exception message</message> </messages> <output> <report> <filters> <coords> <coord type="ver" rollup="1"> <el id="3" /> </coord> <coord type="aAttr" entity-id="85" rollup="1"> <el id="45" /> </coord> </coords> </filters> <cols> <col id="1"> <coords> <coord type="time"> <el id="204001" /> </coord> <coord type="lvl"> <el id="4" /> </coord> </coords> </col> <col id="2"> <coords> <coord type="time"> <el id="205001" /> </coord> <coord type="lvl"> <el id="4" /> </coord> </coords> </col> <col id="3"> <coords> <coord type="time"> <el id="204001" /> </coord> <coord type="lvl"> <el id="5" rollup-mode="U" /> </coord> </coords> </col> <col id="4"> <coords> <coord type="time"> <el id="204002" /> </coord> <coord type="lvl"> <el id="5" rollup-mode="U" /> </coord> </coords> </col> </cols> <rows> <row> <coords> <coord type="acct"> <el id="45" /> </coord> </coords> <cell value="2.345" col="1" /> <cell value="4.567" col="2" /> <cell value="3.397" col="3" /> <cell value="5.274" col="4" /> </row> <row> <coords> <coord type="acct"> <el id="46" /> </coord> </coords> <cell value="5.6" col="1" /> <cell value="2.7" col="2" /> <cell value="1.9" col="3" /> <cell value="9.4" col="4" /> </row> </rows> </report> </output> </response>

Especificación de formato RNC (Relax NG compact)

El siguiente es el esquema de respuesta, proporcionado en el formato Relax NG Compact .
default namespace = ""
start = element response { attribute success { xsd:boolean }, element messages { element message { attribute key { text }?, attribute type { "INFO" | "ERROR" }?, attribute values { text }?, text }+ }?, element output { element report { element filters { coords }?, element cols { element col { attribute id { xsd:integer }, coords }+ }, element rows { element row { coords, element cell { attribute col { xsd:integer }, attribute value { xsd:decimal }, attribute text-rollup { xsd:string }?, # shows up only for text rollups attribute invalid { "0" | "1" }?, # 0=value is valid(default), 1=value is invalid attribute blank { "0" | "1" }?, # 0=value is not blank(default), 1=value is blank element note { xsd:string }? # shows up only if show-cell-notes in the request is "1" and there is a note at this location. }+ }* } } }? }
coords = element coords { coord+ } coord = (stdCoord | dimCoord | acctCoord | timeCoord | calcCoord) stdCoord = element coord { attribute type { "lvl" | "ver" | "cur" }, attribute rollup { "0" | "1" }?, # 0=not a rollup(default), 1=arbitrary rollup/filter attribute offset {xsd:integer }?, attribute offset-strata {xsd:integer }?, coordEl+ #More than 1 indicates arbitrary rollup } dimCoord = element coord { attribute entity-id { xsd:integer }, # This is the dimId/accAttrId/lvlAttrId/dimAttrId. attribute type { "dim" | "aAttr" | "lAttr" }, attribute rollup { "0" | "1" }?, # 0=not a rollup(default), 1=arbitrary rollup/filter coordEl+ #More than 1 indicates arbitrary rollup } acctCoord = element coord { attribute type { "acct" }, attribute rollup { "0" | "1" }?, # 0=not a rollup(default), 1=arbitrary rollup/filter coordAcctEl+ #More than 1 indicates arbitrary rollup } timeCoord = element coord { attribute type { "time" }, attribute rollup { "0" | "1" }?, # 0=not a rollup(default), 1=arbitrary rollup/filter coordTimeEl+ #More than 1 indicates arbitrary rollup } calcCoord = element coord { attribute type { "subtotal" | "diff" | "calc" }, attribute code { text }? }
coordEl = element el { attribute id { xsd:integer }, #This is the dimValId/accAttrValId/lvlAttrValId/dimAttrValId. Id = 0, indicates the root attribute rollup-mode { "U" }? # rollup-mode=U means categorized value }
coordAcctEl = element el { attribute id { xsd:integer }, attribute split-label { xsd:string }? #Will only be emitted if this corresponds to an account split. }
coordTimeEl = (singleTimeEl | ptdEl | timerangeEl) singleTimeEl = element el { attribute id { timeId } } ptdEl = element el { attribute complex-type { "ptd" }, attribute stratum-id { stratumId } # Stratum id of the stratum used in "stratum to date" attribute as-of { timeId } } timerangeEl = element el { attribute complex-type { "timespan" }, attribute start { timeId }, attribute end { timeId } } timeId = xsd:integer # Unique time period id
  • Si una coord de un filtro, una columna o una fila contiene más de un elemento, significa que representa la agrupación arbitraria de todos los elementos de la coord.
  • Si se pasa un marco temporal, qtd o ytd en el filtro, la respuesta contendrá el elemento de rango temporal correspondiente en el filtro.
  • En el eje de filtro, las dimensiones del mismo tipo se combinarán en una agrupación arbitraria, excepto las dimensiones, los atributos de cuenta y los atributos de nivel, que se combinarán si el tipo y el ID de entidad coinciden.
  • El modo de agrupación de C en la respuesta de un elemento del filtro se convierte en un solo elemento de agrupación en la respuesta.
  • Si no hay coordenadas de filtro, la respuesta no incluirá un elemento de filtros.
  • Si hay un error y no se ha podido ejecutar el informe, no habrá ningún elemento de resultado y el elemento de mensajes incluirá un mensaje con el tipo error.
  • Si una celda es una agrupación de texto, el atributo de valor será 0.