Skip to content

Latest commit

 

History

History
164 lines (111 loc) · 7.9 KB

version_information_endpoint.md

File metadata and controls

164 lines (111 loc) · 7.9 KB

Version information endpoint

This endpoint lists all the available OCPI versions and the corresponding URLs to where version specific details such as the supported endpoints can be found.

Example endpoint structure: /ocpi/cpo/versions and /ocpi/emsp/versions The exact URL to the implemented version endpoint should be given (offline) to parties that interface with your OCPI implementation, this endpoint is the starting point for discovering locations of the different modules and versions of OCPI that have been implemented.

Both the CPO and the eMSP must have this endpoint.

Method Description
GET Fetch information about the supported versions.

Data

Property Type Card. Description
versions Version + A list of supported OCPI versions.

Version class

Property Type Card. Description
version VersionNumber 1 The version number.
url URL 1 URL to the endpoint containing version specific information.

GET

Fetch all supported OCPI versions of this CPO or eMSP.

Example

[
    {
        "version": "2.1.1",
        "url": "https://example.com/ocpi/cpo/2.1.1/"
    },
    {
        "version": "2.0",
        "url": "https://example.com/ocpi/cpo/2.0/"
    }
]

Version details endpoint

Example: /ocpi/cpo/2.0/ and /ocpi/emsp/2.0/

This endpoint lists the supported endpoints and their URLs for a specific OCPI version. To notify the other party that the list of endpoints of your current version has changed, you can send a PUT request to the corresponding credentials endpoint (see the credentials chapter).

Both the CPO and the eMSP must have this endpoint.

Method Description
GET Fetch information about the supported endpoints for this version.

Data

Property Type Card. Description
version VersionNumber 1 The version number.
endpoints Endpoint + A list of supported endpoints for this version.

Endpoint class

Property Type Card. Description
identifier ModuleID 1 Endpoint identifier.
url URL 1 URL to the endpoint.

ModuleID enum

The Module identifiers for each endpoint are in the beginning of each Module chapter. The following table contains the list of modules in this version of OCPI. Most modules (except Credentials & registration) are optional, but there might be dependencies between modules, if so that will be mentioned in the module description.

Module ModuleID Remark
CDRs cdrs  
Commands commands  
Credentials & registration credentials Required for all implementations
Locations locations  
Sessions sessions  
Tariffs tariffs  
Tokens tokens  

VersionNumber enum

List of known versions.

Value Description
2.0 OCPI version 2.0.
2.1 OCPI version 2.1. (DEPRECATED, do not use, use 2.1.1 instead)
2.1.1 OCPI version 2.1.1. (this version)

Custom Modules

Parties are allowed to create custom modules or customized versions of the existing modules. For this the ModuleID enum can be extended with additional custom moduleIDs. These custom moduleIDs MAY only be sent to parties with which there is an agreement to use a custom module. Do NOT send custom moduleIDs to parties you are not 100% sure will understand the custom moduleIDs. It is advised to use a prefix (country_code + party_id) for any custom moduleID, this ensures that the moduleID will not be used for any future module of OCPI.

For example: nltnm-tokens

GET

Fetch information about the supported endpoints and their URLs for this version.

Example

{
    "version": "2.0",
    "endpoints": [
        {
            "identifier": "credentials",
            "url": "https://example.com/ocpi/cpo/2.0/credentials/"
        },
        {
            "identifier": "locations",
            "url": "https://example.com/ocpi/cpo/2.0/locations/"
        }
    ]
}