An operation getHistoryReport returns a history of CNode within a given time frame.
The response contains a summary of all transactions in a given period, the account balance of CNode, coins expiry date messages and a complete list of all transactions in a given period. The latter can be also saved to CSV spreadsheet with a given name on the server of CNode. The returned list of transactions is in CSV format by default, it can be converted into JSON format.
Example SOAP request:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="ns1"> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <ns:getHistoryReport> <filename>test.csv</filename> <fromDate>2018/01/17 12:00:00</fromDate> <toDate>2018/07/17 12:41:33</toDate> <onlyTransactions>false</onlyTransactions> <disableMonexCheck>false</disableMonexCheck> <format>JSON</format> </ns:getHistoryReport> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Example SOAP response:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="ns1"> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <ns:getHistoryReportResponse> <return> <summary>Last transfers summary (2018-01-17 12:00:00 to 2018-07-17 12:41:33): total: 0 in: 0 out: 0 passed transfers: 0 (0%) failed transfers: 3 (100%) ongoing transfers: 0 (0%) Current balance: freeBalance: 5.760PLN lockedBalance: 0.000PLN vaultBalance: 0.200PLN Technical transaction summary: (100%) FINISHED_ERR x 3 </summary> <history> Type;StartDate;StartTime;Date;Time;Amount;CommissionAmount;Comment;Service;Payer;PayerId;RecipientName;RecipientId;RecipientBestName;IPEorARId;UniqueTransferId;TransferId;State;Status;MachineName;MachineBalance;VaultBalance First soap received;;;16-07-2018;13:33:38;;;"";;;;;;;;;;MTS_END_OK;LOGIN_SUCCESS;;; User logged in;;;16-07-2018;13:34:00;;;"";;;;;;;;;;MTS_END_OK;LOGIN_SUCCESS;vui 127.0.0.1;; Vui ready;;;16-07-2018;13:34:14;;;"";;;;;;;;;;MTS_END_OK;LOGIN_SUCCESS;vui 127.0.0.1;; Bank transfer;16-07-2018;13:49:00;16-07-2018;13:49:22;-5.000PLN;;"";;;;;;;3SA1PCQKM184MJ9241U8MV343H;;JFuYWNXae5EVEwa31bS37a;MTS_END_FAILURE;BORG_CODE_UNINITIALIZED;vui 127.0.0.1;0.760PLN;- </history> <requestStatus>SUCCESS</requestStatus> <requestStatusDescription>Request succeeded.</requestStatusDescription> </return> </ns:getHistoryReportResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Request parameters:
Parameter | Type | Description | Required? | Specification |
filename | string | The name of the file of CNode, to which history in format CSV is to be saved; if omitted, the operation does not save the file and returns data in JSON format | No | It must be shorter than 1000 characters |
fromDate | string | The date from which the history is to be downloaded | No | The date must be in format YYYY/MM/DD HH:MM:SS |
toDate | string | The date to which the history is to be downloaded | No | The date must be in format YYYY/MM/DD HH:MM:SS |
onlyTransactions | string | ‘true’ if the request is to be get only operations that are transactions | No | |
disableMonexCheck | string | ‘true’ if the operation is to check the validity of the coins | No | |
format | string | The format in which history is to be returned | No | JSON or CSV |
Response parameters:
Name | Type | Descrption |
sumary | string | the summary of transactions and the information about the account balance of CNode |
history | string | the list of all operation of CNode in the given period in JSON or CSV format |
requestStatusDescription | string | a description of the status |
requestStatus | string | the status of the execution of the request |