| 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
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
HTTP/1.1 200 OK
Content-Type: text/csv
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"}]}