Data Web Services
The following web service functions related to data are available in Longview:
Lock
The Lock function sends a request to lock certain data areas in the Longview system. The request to create a lock on a certain data area is similar to the following example:
V7 Request
<data:lockRequest doJECheck="false">
<web:comment>Dallas Trial Balance Load</web:comment>
<!--1 or more repetitions:-->
<web:dimensionSymbolSpec>
<web:dimension>Accounts</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>Data_Load_Accounts###</web:symbolSpec>
</web:dimensionSymbolSpec>
<web:dimensionSymbolSpec>
<web:dimension>TimePeriods</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>CYr_09_YTD</web:symbolSpec>
</web:dimensionSymbolSpec>
<web:dimensionSymbolSpec>
<web:dimension>Entities</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>E11220</web:symbolSpec>
</web:dimensionSymbolSpec>
<web:dimensionSymbolSpec>
<web:dimension>Currencies</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>USD</web:symbolSpec>
</web:dimensionSymbolSpec>
…
<web:dimensionSymbolSpec>
<web:dimension>DIMENSION15</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>DIMENSION15_Default</web:symbolSpec>
</web:dimensionSymbolSpec>
</data:lockRequest>
Element. Attribute | Value | Notes |
---|---|---|
JECheck |
True or false |
This is optional. This indicates whether to perform a check on any unposted journal entries in the data area specified. The default value is false. |
Comment |
A comment |
This is optional. |
Schedule |
A schedule name |
This is optional. |
symbolSpec |
A symbol name and notation, such as IAS_Statements#99 (99 levels of the IAS_Statements hierarchy) |
When only the symbol name is specified, the default value is #0. |
The response from the Data Server is similar to the following example:
V7 Response
<_:lockResponse xmlns:_="http://longview.com/dataservices/WebServices/Data"
xmlns="http://longview.com/dataservices" xmlns:tns="http://longview.com/
dataservices/webServiceObject" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance">
<_:lockResult>
<tns:status>
<tns:type>Success</tns:type>
<tns:code>0</tns:code>
</tns:status>
<tns:lockId>1</tns:lockId>
</_:lockResult>
</_:lockResponse>
Retrieve
The Retrieve function sends a request to retrieve an area of data from the Longview system. This method returns an array of values found in the requested area of data. Each retrieved data value returns:
- the names of the corresponding symbols
- a data type of numeric or string indicating whether a number or string was found the data value
The request to retrieve certain base data areas is similar to the following example:
V7 Request
<data:retrieveRequest unadjusted="true" leafDataOnly="true" ctaData="false">
<!--1 or more repetitions:-->
<web:dimensionSymbolSpec>
<web:dimension>Accounts</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>Data_Load_Accounts###</web:symbolSpec>
</web:dimensionSymbolSpec>
<web:dimensionSymbolSpec>
<web:dimension>TimePeriods</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>CYr_09_YTD</web:symbolSpec>
</web:dimensionSymbolSpec>
<web:dimensionSymbolSpec>
<web:dimension>Entities</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>E11220</web:symbolSpec>
</web:dimensionSymbolSpec>
<web:dimensionSymbolSpec>
<web:dimension>Currencies</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>USD</web:symbolSpec>
</web:dimensionSymbolSpec>
…
<web:dimensionSymbolSpec>
<web:dimension>DIMENSION15</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>DIMENSION15_Default</web:symbolSpec>
</web:dimensionSymbolSpec>
</data:retrieveRequest>
Element.Attribute | Value | Notes |
---|---|---|
Unadjusted |
True or false |
The default value is true. |
leafDataOnly |
True or false |
The default value is true. |
ctaData |
True or false |
The default value is false. |
ruleID |
An integer |
|
Schedule |
A schedule name |
This is optional |
Dimension |
A dimension name |
A dimensionSymbolSpec (containing the dimension and symbolSpec attributes) is required for each dimension in the system. |
symbolSpec |
A symbol name and notation, such as IAS_Statements#99 (99 levels of the IAS_Statements hierarchy) |
When only the symbol name is specified, the default value is #0. A imensionSymbolSpec (containing the dimension and symbolSpec attributes) is required for each dimension in the system. |
The response from the Data Server is similar to the following example:
V7 Response
<_:retrieveResponse xmlns:_="http://longview.com/dataservices/WebServices/Data"
xmlns="http://longview.com/dataservices" xmlns:tns="http://longview.com/dataservices/
webServiceObject" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<_:retrieveResult>
<tns:status>
<tns:type>Success</tns:type>
<tns:code>0</tns:code>
</tns:status>
<tns:dataCell xmlns:ns0="http://longview.com/dataservices/WebServices/Data"
xmlns:ns1="http://longview.com/dataservices/WebServices/Symbol">
<tns:dimensionSymbol>
<tns:dimension>Accounts</tns:dimension>
<tns:symbol>31120</tns:symbol>
</tns:dimensionSymbol>
<tns:dimensionSymbol>
<tns:dimension>TimePeriods</tns:dimension>
<tns:symbol>CYr_09_YTD</tns:symbol>
</tns:dimensionSymbol>
<tns:dimensionSymbol>
<tns:dimension>Entities</tns:dimension>
<tns:symbol>E11220</tns:symbol>
</tns:dimensionSymbol>
<tns:dimensionSymbol>
<tns:dimension>Currencies</tns:dimension>
<tns:symbol>USD</tns:symbol>
</tns:dimensionSymbol>
…
<tns:dimensionSymbol>
<tns:dimension>DIMENSION15</tns:dimension>
<tns:symbol>DIMENSION15_Default</tns:symbol>
</tns:dimensionSymbol>
<tns:type>numeric</tns:type>
<tns:value>10000</tns:value>
</tns:dataCell>
<tns:dataCell xmlns:ns0="http://longview.com/dataservices/WebServices/Data"
xmlns:ns1="http://longview.com/dataservices/WebServices/Symbol">
<tns:dimensionSymbol>
<tns:dimension>Accounts</tns:dimension>
<tns:symbol>31110</tns:symbol>
</tns:dimensionSymbol>
<tns:dimensionSymbol>
<tns:dimension>TimePeriods</tns:dimension>
<tns:symbol>CYr_09_YTD</tns:symbol>
</tns:dimensionSymbol>
<tns:dimensionSymbol>
<tns:dimension>Entities</tns:dimension>
<tns:symbol>E11220</tns:symbol>
</tns:dimensionSymbol>
<tns:dimensionSymbol>
<tns:dimension>Currencies</tns:dimension>
<tns:symbol>USD</tns:symbol>
</tns:dimensionSymbol>
…
<tns:dimensionSymbol>
<tns:dimension>DIMENSION15</tns:dimension>
<tns:symbol>DIMENSION15_Default</tns:symbol>
</tns:dimensionSymbol>
<tns:type>numeric</tns:type>
<tns:value>10000</tns:value>
</tns:dataCell>
…
</_:retrieveResult>
</_:retrieveResponse>
Retrieve to File
The Retrieve to File function sends a request to retrieve an area of data from the Longview system to a file. The Retrieve function’s result can be very large given the XML verbosity. The Retrieve to File function offers an alternative that represents the result set in a more compact manner.
The request to retrieve certain base data areas from a file is similar to the following example:
V7 Request
<data:retrieveToFileRequest>
<web:dataRetrieveRequest unadjusted="true" leafDataOnly="true" ctaData="false">
<!--1 or more repetitions:-->
<web:dimensionSymbolSpec>
<web:dimension>Accounts</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>Data_Load_Accounts###</web:symbolSpec>
</web:dimensionSymbolSpec>
<web:dimensionSymbolSpec>
<web:dimension>TimePeriods</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>CYr_09_YTD</web:symbolSpec>
</web:dimensionSymbolSpec>
<web:dimensionSymbolSpec>
<web:dimension>Entities</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>E11220</web:symbolSpec>
</web:dimensionSymbolSpec>
<web:dimensionSymbolSpec>
<web:dimension>Currencies</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>USD</web:symbolSpec>
</web:dimensionSymbolSpec>
…
<web:dimensionSymbolSpec>
<web:dimension>DIMENSION15</web:dimension>
<!--Zero or more repetitions:-->
<web:symbolSpec>DIMENSION15_Default</web:symbolSpec>
</web:dimensionSymbolSpec>
</web:dataRetrieveRequest>
<web:uncOutputFileName>C:\Users\Administrator\Desktop\Files\Dallas_TrialBalance_
Retrieve.txt</web:uncOutputFileName>
</data:retrieveToFileRequest>
Element.Attribute | Value | Notes |
---|---|---|
Unadjusted |
True or false |
The default value is true. |
leafDataOnly |
True or false |
The default value is true. |
ctaData |
True or false |
The default values is false. |
ruleID |
An integer |
|
Schedule |
A schedule name |
This is optional. |
Dimension |
A dimension name |
A dimensionSymbolSpec (containing the dimension and symbolSpec attributes) is required for each dimension in the system. |
symbolSpec |
A symbol name and notation, such as IAS_Statements#99 (99 levels of the IAS_Statements hierarchy) |
When only the symbol name is specified, the default value is #0. A dimensionSymbolSpec (containing the dimension an symbolSpec attributes) is required for each dimension in the system. |
uncOutputFileName |
A file name |
|
The response from the Data Server is similar to the following example:
V7 Response
<_:retrieveToFileResponse xmlns:_="http://longview.com/dataservices/
WebServices/Data" xmlns="http://longview.com/dataservices" xmlns:tns="http://
longview.com/dataservices/webServiceObject" xmlns:xsi="http://www.w3.org/
2001/XMLSchema-instance">
<_:retrieveToFileResult>
<tns:type>Success</tns:type>
<tns:code>0</tns:code>
</_:retrieveToFileResult>
</_:retrieveToFileResponse>
Submit
The Submit function sends a request to submit data to the Longview system.
The request to submit certain base data areas is similar to the following example:
V7 Request
<data:submitRequest>
<web:options clearDataArea="true" reverseSign="false" serverMath="true"
submitForApproval="false" maxErrors="0" lockID="1">
<web:comment>Load Dallas Trial Balance</web:comment>
</web:options>
<!--1 or more repetitions:-->
<web:dataCell>
<web:dimensionSymbol>
<web:dimension>Accounts</web:dimension>
<web:symbol>11430</web:symbol>
</web:dimensionSymbol>
<web:dimensionSymbol>
<web:dimension>TimePeriods</web:dimension>
<web:symbol>CYr_09_YTD</web:symbol>
</web:dimensionSymbol>
<web:dimensionSymbol>
<web:dimension>Entities</web:dimension>
<web:symbol>E11220</web:symbol>
</web:dimensionSymbol>
<web:dimensionSymbol>
<web:dimension>Currencies</web:dimension>
<web:symbol>USD</web:symbol>
</web:dimensionSymbol>
…
<web:dimensionSymbol>
<web:dimension>DIMENSION15</web:dimension>
<web:symbol>DIMENSION15_Default</web:symbol>
</web:dimensionSymbol>
<web:type>numeric</web:type>
<web:value>10994.730000</web:value>
</web:dataCell>
<web:dataCell>
<web:dimensionSymbol>
<web:dimension>Accounts</web:dimension>
<web:symbol>11440</web:symbol>
</web:dimensionSymbol>
<web:dimensionSymbol>
<web:dimension>TimePeriods</web:dimension>
<web:symbol>CYr_09_YTD</web:symbol>
</web:dimensionSymbol>
<web:dimensionSymbol>
<web:dimension>Entities</web:dimension>
<web:symbol>E11220</web:symbol>
</web:dimensionSymbol>
<web:dimensionSymbol>
<web:dimension>Currencies</web:dimension>
<web:symbol>USD</web:symbol>
</web:dimensionSymbol>
…
<web:dimensionSymbol>
<web:dimension>DIMENSION15</web:dimension>
<web:symbol>DIMENSION15_Default</web:symbol>
</web:dimensionSymbol>
<web:type>numeric</web:type>
<web:value>357.330000</web:value>
</web:dataCell>
<web:dataCell>
…
</data:submitRequest>
Element.Attribute | Value | Notes |
---|---|---|
clearDataArea |
True or false |
This is optional. The default value is false |
reverseSign |
True or false |
This is optional. The default value is false |
serverMath |
True or false |
This is optional. This indicates whether the server math processing logic should be turned off, or retains its current settings during the submission. The default is true. |
submitForApproval |
True or false |
This is optional. This indicates whether the area should be submitted for approval. The default value is false. |
maxErrors |
An integer |
This is optional. The default value is 0. |
lockId |
A lock ID |
This is the ID of the lock. The lock must cover all of the data being submitted. |
Comment |
A comment |
This is optional. |
workflowComment |
A workflow comment |
This is only required if submitForApproval is true. |
dataCell |
A dataCell contains every dimension in the system, along with the symbol name of each dimension |
More than one dataCell can be specified. |
Dimension |
A dimension name |
The dimension, symbol, type, and value attributes make up one set per value being submitted. There is one dimension and one symbol attribute per dimension. |
Symbol |
A symbol name |
The dimension, symbol, type, and value attributes make up one set per value being submitted. There is one dimension and one symbol attribute per dimension. |
Type |
Numeric or string |
The dimension, symbol, type, and value attributes make up one set per value being submitted. |
Value |
A data value |
The value of the submitted data. The dimension, symbol, type, and value attributes make up one set per value being submitted. |
The response from the Data Server is similar to the following example:
V7 Response
<_:submitResponse xmlns:_="http://longview.com/dataservices/WebServices/Data"
xmlns="http://longview.com/dataservices" xmlns:tns="http://longview.com/dataservices/
webServiceObject" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<_:submitResult>
<tns:type>Success</tns:type>
<tns:code>0</tns:code>
<tns:message>(Data Submission) Timer started at 2011/11/09 07:21:24</
tns:message>
<tns:message>SERVERMATH: DEFAULT</tns:message>
<tns:message>MAXERROR: 0</tns:message>
<tns:message>Records read: 435, Records rejected: 0, Records filtered: 0</
tns:message>
<tns:message>(Data Submission) Timer stopped at 2011/11/09 07:21:25</
tns:message>
<tns:message>(Data Submission) Submission assigned batch ID 15</tns:message>
<tns:message>Data Submission completed successfully</tns:message>
</_:submitResult>
</_:submitResponse>
Submit from File
The Submit from File function allows the submission of data values from a file to the Longview system. The Submit function’s request can be very large, given the XML verbosity. The Submit from File function offers an alternative that represents the request set in a more compact manner.
The request to submit a certain base data area from a file is similar to the following example:
V7 Request
<data:submitFromFile>
<data:connInfo>
<dat:user>DalCont</dat:user>
<dat:password>xxxx</dat:password>
<dat:dataServerName>LongviewCPM</dat:dataServerName>
<dat:role>V3_Compatible_Access</dat:role>
<dat:group>ConU</dat:group>
</data:connInfo>
<data:submitFromFileRequest>
<web:options clearDataArea="true" reverseSign="false" serverMath="true"
submitForApproval="false" maxErrors="0" lockID="1">
<web:comment>Load Dallas Trial Balance</web:comment>
</web:options>
<web:uncFileName>C:\Users\Administrator\Desktop\Files\Dallas_TrialBalance_Load
.txt</web:uncFileName>
</data:submitFromFileRequest>
</data:submitFromFile>
Element.Attribute | Value | Notes |
---|---|---|
clearDataArea |
Qtrue or false |
This is optional. The default value is false. |
reverseSign |
True or false |
This is optional. The default value is false. |
serverMath |
true or false |
This is optional. This indicates whether the math server should be turned off, or retains its current settings during the submission. The default is true. |
submitForApproval |
True or false |
This is optional. This indicates whether the area should be submitted for approval. The default value is false. |
maxErrors |
An integer |
This is optional. The default value is 0. |
lockId |
A lock ID |
The is the ID of the lock. |
Comment |
A comment |
This is optional |
workflowComment |
A workflow comment |
This is only required if submitForApproval is true. |
uncFileName |
A file name |
|
The response from the Data Server is similar to the following example:
V7 Response
<_:submitFromFileResponse xmlns:_="http://longview.com/dataservices/
WebServices/Data" xmlns="http://longview.com/dataservices" xmlns:tns="http://
longview.com/dataservices/webServiceObject" xmlns:xsi="http://www.w3.org/
2001/XMLSchema-instance">
<_:submitFromFileResult>
<tns:type>Success</tns:type>
<tns:code>0</tns:code>
<tns:message>(Data Submission) Timer started at 2011/11/09 07:22:48</
tns:message>
<tns:message>SERVERMATH: DEFAULT</tns:message>
<tns:message>MAXERROR: 0</tns:message>
<tns:message>Records read: 435, Records rejected: 0, Records filtered: 0</
tns:message>
<tns:message>(Data Submission) Timer stopped at 2011/11/09 07:22:49</
tns:message>
<tns:message>(Data Submission) Submission assigned batch ID 19</
tns:message>
<tns:message>Data Submission completed successfully</tns:message>
</_:submitFromFileResult>
</_:submitFromFileResponse>
Unlock
The Unlock function sends a request to release a previous lock on a data area in the Longview system. The request to release a previously acquired lock is similar to the following example:
V7 Request
<data:unlock>
<data:connInfo>
<dat:user>DalCont</dat:user>
<dat:password>xxxx</dat:password>
<dat:dataServerName>LongviewCPM</dat:dataServerName>
<dat:role>V3_Compatible_Access</dat:role>
<dat:group>ConU</dat:group>
</data:connInfo>
<data:unlockRequest>
<web:lockId>1</web:lockId>
</data:unlockRequest>
</data:unlock>
Element.Attribute | Value | Notes |
---|---|---|
lockId |
A lock ID |
This is the ID of the lock you want to release |
The response from the Data Server is similar to the following example:
V7 Response
<_:unlockResponse xmlns:_="http://longview.com/dataservices/WebServices/Data"
xmlns="http://longview.com/dataservices" xmlns:tns="http://longview.com/
dataservices/webServiceObject" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance">
<_:unlockResult>
<tns:type>Success</tns:type>
<tns:code>0</tns:code>
</_:unlockResult>
</_:unlockResponse>