session_storage_consumer_API¶
Warning
Experimental API since 2026.10.0. This API is exempt from the EVerest stability guarantees and the deprecation period. Its channels, operations and message payloads may change or be removed in any release without notice until it is promoted to stable. See the policy on experimental components and the experimental feature index.
EVerest API definition for session storage (consumer)
API for EVerest API clients to read and clear persistently stored session records.
Experimental. This API is exempt from the EVerest stability guarantees and the deprecation period; channels, operations and message payloads may change without further notice until it is promoted to stable.
Pagination. get_sessions returns records oldest first, one page per request. A reply carries a continuation_token if more matching records follow; pass it in the next request and iterate until a reply has no token. A page can hold fewer records than requested, in rare cases none, while still carrying a token. An invalid or outdated token starts the iteration from the beginning. The request payload is optional: an empty object requests the first page with the default page size. The started_after filter is compared at millisecond precision.
Deleting records. clear_sessions cannot be undone and also deletes records that are still open; when such a session finishes later, the finish is dropped. The payload is optional: an empty object deletes every stored record. To delete exactly the records already read, pass the session id of the last record received from get_sessions as up_to_session_id; that record and every older one are deleted, sessions that started in the meantime are kept.
Concurrent clients. Neither the bridge nor the store keeps per-client state, so several clients may use the API at the same time. A clear_sessions issued by one client while another is paging removes records from that iteration; the other client’s token stays valid and resumes at the oldest surviving record. Clients sharing one store should coordinate clearing, or clear only what they have read via up_to_session_id.
Missing records. get_session replies with the JSON literal null when no stored record matches the identifier.
Specification: session_storage_consumer_API.yaml · pionix:de:everest:session_storage_consumer_API
Servers¶
default mqtt
default local MQTT
- Host
localhost:1883- Topic prefix
everest_api/1/session_storage_consumer/{module_id}{module_id}The ID of the module as defined in the EVerest config file.
Operations¶
Client to EVerest¶
send_request_get_sessions¶
- Topic
everest_api/1/session_storage_consumer/{module_id}/m2e/get_sessions- Reply
- Sent to
$message.header#/replyToas receive_reply_get_sessions.
Direction: Module to EVerest. Request one page of stored session records, oldest first. Iterate by passing the continuation_token of a reply into the next request until a reply carries no token.
Message Request one page of stored session records application/json
Message send_request_get_sessions
Request one page of stored session records.
Payload
-
headersobject
-
replyTostring
Address to send the response to. Omit it to discard the response. An invalid address, see the EVerest API explanation, rejects the request.
min length 1
-
-
payloadobject GetSessionsRequest
Page request for stored session records. An empty object requests the first page of all records with the default page size.
Examples
{
"headers": {
"replyTo": "everest_api/1/{interface_type}/{module_id}/e2m/{operation_name}/{uuid}"
},
"payload": {}
}
{
"headers": {
"replyTo": "everest_api/1/{interface_type}/{module_id}/e2m/{operation_name}/{uuid}"
},
"payload": {
"limit": 100,
"continuation_token": "5f2a9c31d4e8b0a7:184",
"filter": {
"state": "Finished",
"evse_id": 1
}
}
}
send_request_get_session¶
- Topic
everest_api/1/session_storage_consumer/{module_id}/m2e/get_session- Reply
- Sent to
$message.header#/replyToas receive_reply_get_session.
Direction: Module to EVerest. Request one session record, identified either by its session id or by its OCPP transaction id. The reply will be sent to the replyTo address specified in the message headers. If no record matches the identifier, a null payload will be sent.
Message Request a single stored session record application/json
Message send_request_get_session
Request the session record matching the given identifier.
Payload
-
headersobject
-
replyTostring
Address to send the response to. Omit it to discard the response. An invalid address, see the EVerest API explanation, rejects the request.
min length 1
-
-
payloadobject requiredSessionIdentifier
Identifies a single session record. Exactly one of the members must be set. If both are set, session_id takes precedence.
Example
{
"headers": {
"replyTo": "everest_api/1/{interface_type}/{module_id}/e2m/{operation_name}/{uuid}"
},
"payload": {
"session_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
send_request_clear_sessions¶
- Topic
everest_api/1/session_storage_consumer/{module_id}/m2e/clear_sessions- Reply
- Sent to
$message.header#/replyToas receive_reply_clear_sessions.
Direction: Module to EVerest. Deletes stored session records, including records that are still open. An absent payload deletes every record, up_to_session_id limits the deletion to that record and the records stored before it. This cannot be undone. When a deleted open session finishes later, the finish is dropped and the record does not reappear.
Message Request deletion of stored session records application/json
Message send_request_clear_sessions
Delete all stored session records, or the records up to a given one.
Payload
-
headersobject
-
replyTostring
Address to send the response to. Omit it to discard the response. An invalid address, see the EVerest API explanation, rejects the request.
min length 1
-
-
payloadobject ClearSessionsRequest
Selects the session records to delete. An empty object deletes every stored record.
Examples
{
"headers": {
"replyTo": "everest_api/1/{interface_type}/{module_id}/e2m/{operation_name}/{uuid}"
}
}
{
"headers": {
"replyTo": "everest_api/1/{interface_type}/{module_id}/e2m/{operation_name}/{uuid}"
},
"payload": {
"up_to_session_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
send_communication_check¶
- Topic
everest_api/1/session_storage_consumer/{module_id}/m2e/communication_check
Message Send communication check application/json
Message send_communication_check
Signal to EVerest that communication is good or check shall be stopped
Payload
Send true at least every cfg_communication_check_to_s seconds to signal that the client is alive, otherwise EVerest raises a CommunicationFault, which the next message clears. Send false to stop the check until the module restarts.
Example
true
EVerest to client¶
receive_reply_get_sessions¶
- Topic
- Dynamic: the
replyToaddress from the request's headers. Answers send_request_get_sessions.
Direction: EVerest to Module
Message One page of stored session records application/json
Message receive_reply_get_sessions
Reply to the request to send one page of stored session records
Payload
Example
{
"sessions": [
{
"session_id": "string",
"evse_id": 1,
"evse_id_string": "string",
"connector_id": 1,
"state": "Open",
"timestamp_start": "2019-08-24T14:15:22Z",
"start_reason": "EVConnected"
}
]
}
receive_reply_get_session¶
- Topic
- Dynamic: the
replyToaddress from the request's headers. Answers send_request_get_session.
Direction: EVerest to Module
Message A single stored session record application/json
Message receive_reply_get_session
Reply to the request to send a single session record. Null if no record matches the identifier.
Payload
Exactly one of:
-
#1object Session
One persistently stored session record. A record is created when the session starts and completed when it finishes, so the fields that are only known at the end of a session are absent while the record is open.
-
#2null
Example
{
"session_id": "string",
"evse_id": 1,
"evse_id_string": "string",
"connector_id": 1,
"state": "Open",
"timestamp_start": "2019-08-24T14:15:22Z",
"start_reason": "EVConnected"
}
receive_reply_clear_sessions¶
- Topic
- Dynamic: the
replyToaddress from the request's headers. Answers send_request_clear_sessions.
Direction: EVerest to Module
Message Result of deleting stored session records application/json
Message receive_reply_clear_sessions
Reply to the request to delete stored session records
Payload
object ClearSessionsResult
Result of deleting stored session records
Example
{
"cleared": 0
}
receive_heartbeat¶
- Topic
everest_api/1/session_storage_consumer/{module_id}/e2m/heartbeat
Message Receive heartbeat application/json
Message receive_heartbeat
Heartbeat produced by EVerest as configured via cfg_heartbeat_interval_ms in the EVerest configuration
Payload
64bit unsigned integer. The id of every heartbeat increases by 1 and overflows when the maximum representable value is reached
Example
42
Messages¶
Schemas¶
SessionFilter object¶
Criteria a session record must match to be returned
Additional properties allowed.
-
evse_idinteger
Only records of the EVSE with this numeric id
min 1max 128 -
started_afterstring
Only records whose session started strictly after this point in time, in RFC3339 format. Compared as an instant, so any offset may be used. Fractional seconds are compared at millisecond precision. A request with a value that is not a date-time is discarded without a reply.
format date-time
GetSessionsRequest object¶
Page request for stored session records. An empty object requests the first page of all records with the default page size.
Additional properties allowed.
-
limitinteger
Maximum number of records in the reply. EVerest may return fewer, and clamps the value to its supported maximum.
min 1 -
continuation_tokenstring
Opaque token from a previous reply to continue the iteration. Omit to start from the oldest record. An invalid or outdated token starts the iteration from the beginning.
SessionList object¶
One page of stored session records
Additional properties allowed.
-
sessionsarray required
The records of this page, in the order they were stored, oldest first. Empty if no more records match.
-
itemsobject Session
One persistently stored session record. A record is created when the session starts and completed when it finishes, so the fields that are only known at the end of a session are absent while the record is open.
-
-
continuation_tokenstring
Present if more matching records follow this page. Pass it in the next request to continue the iteration; a reply without it means the iteration is complete.
Session object¶
One persistently stored session record. A record is created when the session starts and completed when it finishes, so the fields that are only known at the end of a session are absent while the record is open.
Additional properties allowed.
-
session_idstring required
The EVSE generated UUID of the session. A session contains at most one transaction, so this also identifies the transaction charged within it.
-
evse_idinteger required
The numeric id of the EVSE this session ran on, as used across EVerest interfaces (1-based).
min 1max 128 -
evse_id_stringstring required
The EVSEID of the EVSE this session ran on, as configured in the EvseManager. Empty if the EvseManager does not provide one.
-
connector_idinteger required
The id of the connector that was used for this session.
min 1 -
timestamp_startstring required
Time the session started, in RFC3339 format
format date-time -
timestamp_stopstring
Time the session finished, in RFC3339 format. Absent while the record is Open, and absent on Stale records.
format date-time -
Why this session was started
enumEVConnectedAuthorized -
transactionobject Transaction
The transaction charged within this session. Absent if the session never reached a transaction, for example when an EV was plugged in but never authorized.
-
ocpp_transaction_idstring
The transaction id known to the CSMS, always as a string. Only present in OCPP setups: for OCPP 2.0.1 and 2.1 it is identical to session_id, for OCPP 1.6 it is the numeric id assigned by the CSMS in decimal notation, which arrives only after the transaction has already started. With early OCPP TxStartPoints an OCPP transaction can exist for a session that never reaches an EVerest transaction, so this may be present while transaction is absent.
-
ocpp_transaction_timestamp_startstring
Time the OCPP transaction started, in RFC3339 format, as reported in the transaction events of the OCPP module. It is the charging station clock at the OCPP transaction start and can differ from timestamp_start and from the timestamps of transaction, because the point at which an OCPP 2.x transaction starts is configurable via its TxStartPoint. Absent if no OCPP module is connected or the event was not received.
format date-time -
ocpp_transaction_timestamp_stopstring
Time the OCPP transaction stopped, in RFC3339 format, as reported in the transaction events of the OCPP module. It is the charging station clock at the OCPP transaction stop and can differ from timestamp_stop and from the timestamps of transaction, because the point at which an OCPP 2.x transaction stops is configurable via its TxStopPoint. Absent if no OCPP module is connected or the event was not received.
format date-time -
costobject SessionCost ↗
Cost and tariff information reported for this session. Only present in setups where a cost source is connected, and all figures originate from the CSMS. The id_tag member is never populated, because the raw id token is not persisted.
Transaction object¶
The transaction charged within a session. It starts at the point where all preconditions for charging are met and finishes when one of them irrevocably becomes false, so the fields that are only known at the end of a transaction are absent while it is running.
Additional properties allowed.
-
timestamp_startstring required
Time the transaction started, in RFC3339 format
format date-time -
timestamp_stopstring
Time the transaction finished, in RFC3339 format. Absent while the transaction is still running.
format date-time -
energy_Wh_import_startnumber required
Total imported energy reading taken when the transaction started, in Wh
-
energy_Wh_import_stopnumber
Total imported energy reading taken when the transaction finished, in Wh. Absent while the transaction is still running.
-
id_token_hashstring
Hash of the id token that started the transaction. The raw token is never stored as a dedicated field, but note that a stored signed meter value embeds it (OCMF ID field). Computed as the lower case hex encoded SHA256 digest of the id token type concatenated with the id token value, matching the hash the OCPP stack uses for its authorization cache, so a hash computed elsewhere in the stack can be compared to this one directly. Absent only if the digest could not be calculated.
min length 64max length 64 -
Type of the id token that started the transaction. Part of the input to id_token_hash, so it is needed to reproduce the hash.
enumCentraleMAIDMacAddressISO14443ISO15693KeyCodeLocalNoAuthorization -
How the id token was presented, i.e. which authorization mechanism started this transaction.
enumOCPPRFIDAutochargePlugAndChargeBankCard -
Why the transaction was stopped. Absent while the transaction is still running. A transaction that was interrupted by a power cycle and recovered on the next boot carries PowerLoss.
enumEmergencyStopEVDisconnectedHardResetLocalOtherPowerLossRebootRemoteSoftResetUnlockCommandDeAuthorizedEnergyLimitReachedGroundFaultLocalOutOfCreditMasterPassOvercurrentFaultPowerQualitySOCLimitReachedStoppedByEVTimeLimitReachedTimeoutReqEnergyTransferRejectedEVSEDisabled -
signed_meter_value_startobject
Signed meter value (e.g. an OCMF record) captured when the transaction started. Only populated when the module is configured to store signed meter values via its store_signed_meter_values config option. Be aware that the signed data typically embeds the raw id token (OCMF ID field), so enabling the option persists raw tokens. May only become available when the transaction finishes, in which case it is completed at that point.
Additional properties allowed.
-
signed_meter_datastring required
Signed meter data (encoded in a string representation with eg. Base64)
-
signing_methodstring required
Method used to create the signature
-
encoding_methodstring required
Method used to encode the meter values before signing them
-
public_keystring
Public key (encoded in a string representation with eg. Base64)
-
timestampstring
Timestamp of measurement in RFC3339 format
format date-time
-
-
signed_meter_value_stopobject
Signed meter value (e.g. an OCMF record) captured when the transaction finished, with the same config gate and raw-token caveat as signed_meter_value_start. Absent while the transaction is still running.
Additional properties allowed.
-
signed_meter_datastring required
Signed meter data (encoded in a string representation with eg. Base64)
-
signing_methodstring required
Method used to create the signature
-
encoding_methodstring required
Method used to encode the meter values before signing them
-
public_keystring
Public key (encoded in a string representation with eg. Base64)
-
timestampstring
Timestamp of measurement in RFC3339 format
format date-time
-
SessionState string¶
Lifecycle state of a stored session record
- Open: The session is ongoing.
- Finished: The session finished. Sessions with a running transaction that were interrupted by a power cycle are also closed by the module during recovery on the next boot, in which case the transaction carries stop reason PowerLoss and the session stop timestamp is the time of the recovery.
- Stale: The session never finished and never will. A newer session was started on the same EVSE while this record was still Open, which means tracking of this one was lost, for example in a crash or a power cycle during a session without a running transaction.
OpenFinishedStaleSessionIdentifier object¶
Identifies a single session record. Exactly one of the members must be set. If both are set, session_id takes precedence.
Additional properties allowed.
-
session_idstring
The EVSE generated UUID of the session
-
ocpp_transaction_idstring
The transaction id known to the CSMS
ClearSessionsRequest object¶
Selects the session records to delete. An empty object deletes every stored record.
Additional properties allowed.
-
up_to_session_idstring
Session id of the newest record to delete. Deletes that record and every record stored before it, in the order get_sessions returns them, and keeps the records stored after it. A client that has read all records with get_sessions can pass the session id of the last record it received to delete exactly what it has read, without losing sessions that started in the meantime. If no record with this id exists, nothing is deleted.
ClearSessionsResult object¶
Result of deleting stored session records
Additional properties allowed.
-
clearedinteger required
Number of session records that were deleted. With up_to_session_id set, 0 means that no record with that session id exists.
min 0
CommunicationCheck boolean¶
Send true at least every cfg_communication_check_to_s seconds to signal that the client is alive, otherwise EVerest raises a CommunicationFault, which the next message clears. Send false to stop the check until the module restarts.
HeartBeatId integer¶
64bit unsigned integer. The id of every heartbeat increases by 1 and overflows when the maximum representable value is reached
Schemas from other APIs¶
CertificateHashDataInfo object defined in auth_consumer_API.yaml ↗¶
Contains the certificate information
Additional properties allowed.
-
hashAlgorithmstring required
Used algorithms for the hashes provided
enumSHA256SHA384SHA512 -
issuerNameHashstring required
Hashed value of the Issuer Distinguished Name
max length 128 -
issuerKeyHashstring required
Hashed value of the issuers public key
max length 128 -
serialNumberstring required
The serial number of the certificate
max length 40 -
responderURLstring required
This contains the responder URL
max length 512
CustomIdToken object defined in auth_consumer_API.yaml ↗¶
Type for a custom id token with a free-form type
Additional properties allowed.
-
valuestring required
Arbitrary value of the IdToken
min length 0max length 36 -
typestring required
Custom type of the token
min length 0max length 50
IdToken object defined in auth_consumer_API.yaml ↗¶
Type for an id token
Additional properties allowed.
-
valuestring required
Arbitrary value of the IdToken: This has to be printable case insensitive ascii
min length 0max length 36 -
Type of the token
enumCentraleMAIDMacAddressISO14443ISO15693KeyCodeLocalNoAuthorization -
additional_infoarray<object>
A list of additional custom id tokens than can be used for providing additional information for validation
-
itemsobject CustomIdToken ↗
Type for a custom id token with a free-form type
-
ProvidedIdToken object defined in auth_consumer_API.yaml ↗¶
Type for IdToken provided by auth token providers. Contains additional information about the IdToken like the source and purpose
Additional properties allowed.
-
request_idinteger
Id of the authorization request of this token. Could be used to put remoteStartId of OCPP2.0.1
-
Authorization type of the token.
enumOCPPRFIDAutochargePlugAndChargeBankCardmin length 2max length 32 -
connectorsarray<integer>
A list of connector ids to which the authorization can be assigned
-
itemsintegermin 1
-
-
prevalidatedboolean
Indicates that the id token is already validated by the provider
-
certificatestring
The X.509 certificated presented by EV and encoded in PEM format
max length 5500 -
iso15118CertificateHashDataarray<object>
Contains the information needed to verify the EV Contract Certificate via OCSP
min items 1max items 4-
itemsobject CertificateHashDataInfo ↗
An array of contract certificate infos
-
MessageContent object defined in display_message_API.yaml ↗¶
Contains message details
Additional properties allowed.
-
languagestring
-
contentstring required
ChargingPriceComponent object defined in session_cost_API.yaml ↗¶
Charging price for a category
Additional properties allowed.
Currency object defined in session_cost_API.yaml ↗¶
Currency object containing the currency code and the accuracy of the minor unit according to ISO 4217.
Additional properties allowed.
-
Currency code.
enumAEDAFNALLAMDANGAOAARSAUDAWGAZNBAMBBDBDTBGNBHDBIFBMDBNDBOBBOVBRLBSDBTNBWPBYNBZDCADCDFCHECHFCHWCLFCLPCNYCOPCOUCRCCUCCUPCVECZKDJFDKKDOPDZDEGPERNETBEURFJDFKPGBPGELGHSGIPGMDGNFGTQGYDHKDHNLHTGHUFIDRILSINRIQDIRRISKJMDJODJPYKESKGSKHRKMFKPWKRWKWDKYDKZTLAKLBPLKRLRDLSLLYDMADMDLMGAMKDMMKMNTMOPMRUMURMVRMWKMXNMXVMYRMZNNADNGNNIONOKNPRNZDOMRPABPENPGKPHPPKRPLNPYGQARRONRSDRUBRWFSARSBDSCRSDGSEKSGDSHPSLESLLSOSSRDSSPSTNSVCSYPSZLTHBTJSTMTTNDTOPTRYTTDTWDTZSUAHUGXUSDUSNUYIUYUUYWUZSVEDVESVNDVUVWSTXAFXCDXDRXOFXPFXSUXUAYERZARZMWZWLmin length 3max length 3 -
decimalsinteger
The number of digits after the decimal separator, that are expressed by the minor units of the currency. For example for Euro, Euro cents express 2 digits after the decimal separator. In other words, the price in the main currency units would be the
value * 10^(-decimals).min 0
IdlePrice object defined in session_cost_API.yaml ↗¶
Price components when idle
Additional properties allowed.
-
grace_minutesinteger
Grace period in minutes before idle time is charged. Grace minutes start counting from the timestamp of the message in which state changed from "Charging" to "Idle".
MoneyAmount object defined in session_cost_API.yaml ↗¶
'Money amount is expressed as an amount of minor units of the currency. Example price of 1.23 EUR is expressed as { value: 123 }'
Additional properties allowed.
-
valueinteger required
The amount of minor units of the currency.
NextPeriodPrice object defined in session_cost_API.yaml ↗¶
Pricing for the next period
Additional properties allowed.
-
timestamp_fromstring required
Time when these prices become active, in RFC3339 format.
format date-time -
charging_pricearray<object> required
Price components while charging
-
itemsobject ChargingPriceComponent ↗
Charging price for a category
-
-
idle_priceobject IdlePrice ↗
Price components while idle. Optional if no idle fee charged.
Price object defined in session_cost_API.yaml ↗¶
Price object containing the currency and the value of money.
Additional properties allowed.
-
valueobject requiredMoneyAmount ↗
Value in the minor units of the currency.
SessionCost object defined in session_cost_API.yaml ↗¶
Session cost object containing the total cost of the session and a list of chunks
Additional properties allowed.
-
session_idstring required
The session id
-
currencyobject requiredCurrency ↗
Currency of the session cost. It applies to all chunks.
-
cost_chunksarray<object>
List of cost chunks. The total cost of the session is the sum of all chunks.
-
charging_pricearray<object>
Charging prices.
-
next_periodobject NextPeriodPrice ↗
Charging prices for the next period, starting from the given date/time
-
Session status. Session can be running or finished. Costs of the running session are not final and can change. Only after the session is finished, the session cost can be committed to bank and/or backend.
enumRunningIdleFinished -
messagearray<object>
Message to show to the user containing information about the price
-
itemsobject MessageContent ↗
Message with pricing information in a specific language
-
-
qr_codestring
QR Code with more information. For example when the charging is finished, to download the invoice from
SessionCostChunk object defined in session_cost_API.yaml ↗¶
A chunk of the session cost. The total cost of the session is the sum of all chunks.
Additional properties allowed.
-
timestamp_fromstring
Absolute timestamp for the start of this chunk in RFC3339 format
format date-time -
timestamp_tostring
Absolute timestamp for the end of this chunk in RFC3339 format
format date-time -
metervalue_frominteger
Metervalue (energy Wh import) for the start of this chunk
-
metervalue_tointeger
Metervalue (energy Wh import) for the end of this chunk
-
costobject MoneyAmount ↗
Cost of the energy (or other things like time, base price, ...) consumed during this chunk in the currency specified in the session price
-
Cost category. Typically this is energy, time or a flat fee.
enumEnergyTimeFlatFeeOther