<back to all web services

ReadingsBulk

The following routes are available for this service:
GET/v8/readings-bulk
GET/v8/readings-bulk/{from}
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class ReadingsBulk : Generic(), IGet
{
    /**
    * If not given, the first object is given after the last request, otherwise gives the first ... data objects received from EDSN/Grid operator received after the given time stamp. Keep in mind, the time stamp is related to when SDS received the data from EDSN, not the date of the data itself!
    */
    @ApiMember(DataType="Time stamp with format: yyyyMMdd-HHmmss-ffffff", Description="If not given, the first object is given after the last request, otherwise gives the first ... data objects received from EDSN/Grid operator received after the given time stamp. Keep in mind, the time stamp is related to when SDS received the data from EDSN, not the date of the data itself!", Name="From")
    open var from:String? = null

    /**
    * Include received interval objects in the result
    */
    @ApiMember(DataType="Boolean, default: true", Description="Include received interval objects in the result", Name="IncludeIntervalObjects")
    open var includeIntervalObjects:Boolean? = null

    /**
    * Include received day objects in the result
    */
    @ApiMember(DataType="Boolean, default: false", Description="Include received day objects in the result", Name="IncludeDayObjects")
    open var includeDayObjects:Boolean? = null

    /**
    * Gives option to filter return objects, for example to get always only hour records or day records
    */
    @ApiMember(DataType="Enum: None, Hour, Day, LastDayOnly, Month", Description="Gives option to filter return objects, for example to get always only hour records or day records", Name="ObjectFilter")
    open var objectFilter:Filter? = null
}

open class Generic
{
    /**
    * Api-key. Used to provide credentials to the api. Can also be provided through the request headers with key: X-API-KEY
    */
    @ApiMember(DataType="String", Description="Api-key. Used to provide credentials to the api. Can also be provided through the request headers with key: X-API-KEY", IsRequired=true, Name="ApiKey")
    open var apiKey:String? = null
}

enum class Filter
{
    None,
    Hour,
    Day,
    LastDayOnly,
    Month,
}

open class P4ReadingsBulk
{
    open var message:String? = null
    open var timeStamp:String? = null
    open var dayObjectCount:Int? = null
    open var intervalObjectCount:Int? = null
    open var rejectionObjectCount:Int? = null
    open var dayObjects:ArrayList<P4ReadingDay>? = null
    open var intervalObjects:ArrayList<P4ReadingInterval>? = null
    open var rejectionObjects:ArrayList<P4Rejection>? = null
}

open class P4ReadingDay
{
    open var ean:String? = null
    open var meterId:String? = null
    open var queryDate:Date? = null
    open var measureUnit:String? = null
    open var r180:BigDecimal? = null
    open var r181:BigDecimal? = null
    open var r182:BigDecimal? = null
    open var r280:BigDecimal? = null
    open var r281:BigDecimal? = null
    open var r282:BigDecimal? = null
}

open class P4ReadingInterval
{
    open var ean:String? = null
    open var meterId:String? = null
    open var queryDate:Date? = null
    open var measureUnit:String? = null
    open var items:ArrayList<P4ReadingIntervalItem>? = null
}

open class P4ReadingIntervalItem
{
    open var dateTimeOffset:Date? = null
    open var r180:BigDecimal? = null
    open var r280:BigDecimal? = null
}

open class P4Rejection
{
    open var ean:String? = null
    open var queryDate:Date? = null
    open var queryReason:String? = null
    open var rejectionCode:String? = null
    open var rejectionText:String? = null
}

Kotlin ReadingsBulk DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v8/readings-bulk HTTP/1.1 
Host: p4.smartdatasolutions.eu 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"message":"String","timeStamp":"String","dayObjectCount":0,"intervalObjectCount":0,"rejectionObjectCount":0,"dayObjects":[{"ean":"String","meterId":"String","queryDate":"0001-01-01","measureUnit":"String","r180":0,"r181":0,"r182":0,"r280":0,"r281":0,"r282":0}],"intervalObjects":[{"ean":"String","meterId":"String","queryDate":"0001-01-01","measureUnit":"String","items":[{"dateTimeOffset":"0001-01-01T00:00:00+00:00","r180":0,"r280":0}]}],"rejectionObjects":[{"ean":"String","queryDate":"0001-01-01","queryReason":"String","rejectionCode":"String","rejectionText":"String"}]}