Ir para o conteúdo principal
Adaptive Planning
Especificação de REST customReportValues

Especificação de REST customReportValues

Esta seção fornece informações de suporte sobre a chamada de customReportValues.

Solicitação

Exemplo

<?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>

Especificação de formato RNC (Relax NG Compact)

O esquema de solicitação a seguir é fornecido no 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+ }

Suposições

  • As credenciais podem ser de logon ou tíquete (como atualmente).
  • Os eixos devem ser especificados na seguinte ordem: X, Y, (opcional) FILTER.
  • Valores inválidos sempre serão marcados. Na resposta, há um indicador de atributo inválido na célula.
  • Período temporal, qtd e ytd especificados no filtro aparecerão como intervalos de tempo nos filtros da resposta.
  • Uma célula é considerada em branco se o valor dela no explorador de células está vazio. As células que consolidam em um valor de texto vazio não são consideradas em branco.
  • Construção de TimeId: #consulte IDs usando a API exportTime.

Resposta

Exemplo
<?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>

Especificação de formato RNC (Relax NG Compact)

O esquema de resposta a seguir é fornecido no 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
  • Se uma coord em um filtro, coluna ou linha contém mais de um elemento, isso significa que ela representa a consolidação arbitrária de todos os elementos na coord.
  • Se um período temporal, qtd ou ytd é passado no filtro, a resposta contém o elemento de intervalo de tempo correspondente no filtro.
  • No eixo do filtro, as dimensões do mesmo tipo serão combinadas em uma consolidação arbitrária, exceto dimensões, atributos de conta e atributos de nível, que serão combinados se o tipo e a ID de entidade corresponderem.
  • O modo de consolidação de C na resposta de um elemento no filtro é transformado em um único elemento de consolidação na resposta.
  • Se não houver coordenadas de filtro, a resposta não incluirá um elemento de filtros.
  • Se houver um erro e o relatório não puder ser executado, não haverá um elemento de saída e o elemento de mensagens incluirá uma mensagem com erro de tipo.
  • Se uma célula é uma consolidação de texto, o atributo de valor será 0.