<back to all web services

ReadingsBulk

The following routes are available for this service:
GET/v8/readings-bulk
GET/v8/readings-bulk/{from}
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports SDS.V8.APIs.P4.EU.ServiceModel
Imports SDS.V8.APIs.P4.EU.ServiceModel.Types
Imports SDS.P4.Common.DTO.EDSN

Namespace Global

    Namespace SDS.P4.Common.DTO.EDSN

        Public Partial Class P4ReadingDay
            Public Overridable Property Ean As String
            Public Overridable Property MeterId As String
            Public Overridable Property QueryDate As DateOnly
            Public Overridable Property MeasureUnit As String
            Public Overridable Property R180 As Decimal?
            Public Overridable Property R181 As Decimal?
            Public Overridable Property R182 As Decimal?
            Public Overridable Property R280 As Decimal?
            Public Overridable Property R281 As Decimal?
            Public Overridable Property R282 As Decimal?
        End Class

        Public Partial Class P4ReadingInterval
            Public Overridable Property Ean As String
            Public Overridable Property MeterId As String
            Public Overridable Property QueryDate As DateOnly
            Public Overridable Property MeasureUnit As String
            Public Overridable Property Items As List(Of P4ReadingIntervalItem)
        End Class

        Public Partial Class P4ReadingIntervalItem
            Public Overridable Property DateTimeOffset As DateTimeOffset
            Public Overridable Property R180 As Decimal
            Public Overridable Property R280 As Decimal?
        End Class

        Public Partial Class P4Rejection
            Public Overridable Property Ean As String
            Public Overridable Property QueryDate As DateOnly
            Public Overridable Property QueryReason As String
            Public Overridable Property RejectionCode As String
            Public Overridable Property RejectionText As String
        End Class
    End Namespace

    Namespace SDS.V8.APIs.P4.EU.ServiceModel

        Public Partial Class Generic
            '''<Summary>
            '''Api-key. Used to provide credentials to the api. Can also be provided through the request headers with key: X-API-KEY
            '''</Summary>
            <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")>
            Public Overridable Property ApiKey As String
        End Class

        Public Partial Class ReadingsBulk
            Inherits Generic
            Implements IGet
            '''<Summary>
            '''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!
            '''</Summary>
            <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")>
            Public Overridable Property From As String

            '''<Summary>
            '''Include received interval objects in the result
            '''</Summary>
            <ApiMember(DataType:="Boolean, default: true", Description:="Include received interval objects in the result", Name:="IncludeIntervalObjects")>
            Public Overridable Property IncludeIntervalObjects As Boolean

            '''<Summary>
            '''Include received day objects in the result
            '''</Summary>
            <ApiMember(DataType:="Boolean, default: false", Description:="Include received day objects in the result", Name:="IncludeDayObjects")>
            Public Overridable Property IncludeDayObjects As Boolean

            '''<Summary>
            '''Gives option to filter return objects, for example to get always only hour records or day records
            '''</Summary>
            <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")>
            Public Overridable Property ObjectFilter As Filter

            Public Enum Filter
                None
                Hour
                Day
                LastDayOnly
                Month
            End Enum
        End Class
    End Namespace

    Namespace SDS.V8.APIs.P4.EU.ServiceModel.Types

        Public Partial Class P4ReadingsBulk
            Public Overridable Property Message As String
            Public Overridable Property TimeStamp As String
            Public Overridable Property DayObjectCount As Integer?
            Public Overridable Property IntervalObjectCount As Integer?
            Public Overridable Property RejectionObjectCount As Integer?
            Public Overridable Property DayObjects As List(Of P4ReadingDay)
            Public Overridable Property IntervalObjects As List(Of P4ReadingInterval)
            Public Overridable Property RejectionObjects As List(Of P4Rejection)
        End Class
    End Namespace
End Namespace

VB.NET ReadingsBulk DTOs

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

HTTP + XML

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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<P4ReadingsBulk xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SDS.V8.APIs.P4.EU.ServiceModel.Types">
  <DayObjectCount>0</DayObjectCount>
  <DayObjects xmlns:d2p1="http://schemas.datacontract.org/2004/07/SDS.P4.Common.DTO.EDSN">
    <d2p1:P4ReadingDay>
      <d2p1:Ean>String</d2p1:Ean>
      <d2p1:MeasureUnit>String</d2p1:MeasureUnit>
      <d2p1:MeterId>String</d2p1:MeterId>
      <d2p1:QueryDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System" />
      <d2p1:R180>0</d2p1:R180>
      <d2p1:R181>0</d2p1:R181>
      <d2p1:R182>0</d2p1:R182>
      <d2p1:R280>0</d2p1:R280>
      <d2p1:R281>0</d2p1:R281>
      <d2p1:R282>0</d2p1:R282>
    </d2p1:P4ReadingDay>
  </DayObjects>
  <IntervalObjectCount>0</IntervalObjectCount>
  <IntervalObjects xmlns:d2p1="http://schemas.datacontract.org/2004/07/SDS.P4.Common.DTO.EDSN">
    <d2p1:P4ReadingInterval>
      <d2p1:Ean>String</d2p1:Ean>
      <d2p1:Items>
        <d2p1:P4ReadingIntervalItem>
          <d2p1:DateTimeOffset xmlns:d6p1="http://schemas.datacontract.org/2004/07/System">
            <d6p1:DateTime>0001-01-01T00:00:00Z</d6p1:DateTime>
            <d6p1:OffsetMinutes>0</d6p1:OffsetMinutes>
          </d2p1:DateTimeOffset>
          <d2p1:R180>0</d2p1:R180>
          <d2p1:R280>0</d2p1:R280>
        </d2p1:P4ReadingIntervalItem>
      </d2p1:Items>
      <d2p1:MeasureUnit>String</d2p1:MeasureUnit>
      <d2p1:MeterId>String</d2p1:MeterId>
      <d2p1:QueryDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System" />
    </d2p1:P4ReadingInterval>
  </IntervalObjects>
  <Message>String</Message>
  <RejectionObjectCount>0</RejectionObjectCount>
  <RejectionObjects xmlns:d2p1="http://schemas.datacontract.org/2004/07/SDS.P4.Common.DTO.EDSN">
    <d2p1:P4Rejection>
      <d2p1:Ean>String</d2p1:Ean>
      <d2p1:QueryDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System" />
      <d2p1:QueryReason>String</d2p1:QueryReason>
      <d2p1:RejectionCode>String</d2p1:RejectionCode>
      <d2p1:RejectionText>String</d2p1:RejectionText>
    </d2p1:P4Rejection>
  </RejectionObjects>
  <TimeStamp>String</TimeStamp>
</P4ReadingsBulk>