Page 72/95
21January2021/Version 0
LEM International SA
Chemin des Aulx 8
1228 PLAN-LES-OUATES Switzerland
www.lem.com
The transaction must be terminated using a stop request. The necessary input to stop the active
transaction is its transactionId. Response to the stop request contains the nal data structure,
in /legal format.
The last transaction and previous ones can be retrieved from the DCBM memory.
On the HTTP/REST interface, the DCBM supports two data formats for readouts:
• LEM proprietary format, in /legal API (see §7.1)
• Certied, billable, OCMF-compliant format in /ocmf API (see 7.1) (see "3.4. Certication and
compliance")
!
For backend storage, OCMF format shall be preferred over LEM format. See "7.3.1. Energy
registering".
Four modes of access are available. All the readings of transactions are digitally signed.
Retrieve the last transaction (or current)
/v1/legal
/v1/ocmf
If a transaction is on-going, this request
retrieves the current transaction.
Otherwise, the last one is retrieved.
Retrieve by transactionId
(search limited to transactions)
/v1/legal?transactionId=<xyz>
/v1/ocmf?transactionId=<xyz>
With <xyz> the transactionId of the
transaction to retrieve
(search limited to transactions)
Retrieve by internal storage index
/v1/legal/<index>
/v1/ocmf/<index>
With <index> a positive number. See
below note.
1)
Internal in the
response to a start transaction request.
Retrieve by chronological storage index
/v1/legal/-<index>
/v1/ocmf/-<index>
With <index> = -1 the past transaction
before the latest
With <index> = -20398 the oldest
transaction stored (once storage reached
full capacity).
Table 8: Solutions for retrieving past transactions
Note:
1)
Chronological storage index is advised for retrieving all stored transactions.
Indeed, behavior of internal storage index is as follows:
• Transaction storage is a circular buer, allowing wrap-around (see "7.2.4. Memory depth"). Internal storage indexes
can span from 0 to 20425, with a buer gap of 27 transactions.
• Hence, retrieving all transactions through internal storage index might throw back HTTP error “404 - Not found” for
some internal storage indexes.