OData API Configuration
The OData API exposes D2000 archive data and EDA vector data as OData 4.0 entity sets. OData clients (Power BI, Excel, custom integrations) can query the data using the standard $filter, $select, $orderby and $top query options. The implementation is based on Apache Olingo.
Endpoints
The OData service is mounted at /api/odata and is secured the same way as the server-to-server REST API (API key, JWT bearer, or Basic auth).
Method | Path | Description |
|---|---|---|
|
| Service document — lists available entity sets |
|
| Full CSDL XML schema |
|
| Archive data |
|
| EDA vector data |
The service document returned at the root path:
{
"@odata.context": "$metadata",
"value": [
{ "name": "ArchiveValues", "url": "ArchiveValues" },
{ "name": "EdaVectorValues", "url": "EdaVectorValues" }
]
}Querying archive data
GET /api/odata/ArchiveValues
?$filter=archiveName eq 'AR.Temperature'
and timestamp ge 2026-01-01T00:00:00Z
and timestamp le 2026-01-02T00:00:00Z
&$select=timestamp,value,status
&$top=1000
&$orderby=timestamp ascExample response:
{
"@odata.context": "$metadata#ArchiveValues",
"value": [
{
"timestamp": "2026-01-01T00:00:00Z",
"value": 23.5,
"status": { "alarmActive": false, "limitHigh": false }
}
]
}Querying EDA vector data
GET /api/odata/EdaVectorValues
?$filter=vectorCode eq 'EDA_ENERGY_METER_01'
and timestamp ge 2026-01-01T00:00:00Z
and timestamp le 2026-01-31T23:59:59Z
&$select=timestamp,value,statusAuthentication
The OData endpoint requires the same authentication as the server-to-server REST API. Send an API key, a JWT bearer token, or Basic authentication:
curl -H "X-API-Key: my-secret-api-key" \
"https://smartweb.example.com/api/odata/ArchiveValues?\$top=10"Configuration
No OData-specific configuration is required — the OData interface is part of the standard smartweb.jar and is exposed automatically. Access control is performed by the SmartWeb authentication layer and by the REST API access filter (see Universal API Configuration). To use OData, make sure that:
At least one server-to-server authentication mechanism is enabled — API key, OAuth2 JWT, or Basic auth (see Configuration of Authentication).
The connection to D2000 is configured (see Connection Configuration on D2000) for archive data, and the EDA connection (see Configuration of the EDA Server Connection) for EDA vector data.
smartweb:
connections:
- host: d2server.example.com
port: 3120
edaConnection:
connectionMode: DIRECT
connections:
- host: eda-server.example.com
port: 3130
authentication:
authModes:
- AUTH_CREDENTIALS_IN_SESSION
apiKeys:
enabled: true