| GET | /v8/readings-bulk | ||
|---|---|---|---|
| GET | /v8/readings-bulk/{from} |
namespace SDS.V8.APIs.P4.EU.ServiceModel
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type P4ReadingDay() =
member val Ean:String = null with get,set
member val MeterId:String = null with get,set
member val QueryDate:DateOnly = new DateOnly() with get,set
member val MeasureUnit:String = null with get,set
member val R180:Nullable<Decimal> = new Nullable<Decimal>() with get,set
member val R181:Nullable<Decimal> = new Nullable<Decimal>() with get,set
member val R182:Nullable<Decimal> = new Nullable<Decimal>() with get,set
member val R280:Nullable<Decimal> = new Nullable<Decimal>() with get,set
member val R281:Nullable<Decimal> = new Nullable<Decimal>() with get,set
member val R282:Nullable<Decimal> = new Nullable<Decimal>() with get,set
[<AllowNullLiteral>]
type P4ReadingIntervalItem() =
member val DateTimeOffset:DateTimeOffset = new DateTimeOffset() with get,set
member val R180:Decimal = new Decimal() with get,set
member val R280:Nullable<Decimal> = new Nullable<Decimal>() with get,set
[<AllowNullLiteral>]
type P4ReadingInterval() =
member val Ean:String = null with get,set
member val MeterId:String = null with get,set
member val QueryDate:DateOnly = new DateOnly() with get,set
member val MeasureUnit:String = null with get,set
member val Items:ResizeArray<P4ReadingIntervalItem> = null with get,set
[<AllowNullLiteral>]
type P4Rejection() =
member val Ean:String = null with get,set
member val QueryDate:DateOnly = new DateOnly() with get,set
member val QueryReason:String = null with get,set
member val RejectionCode:String = null with get,set
member val RejectionText:String = null with get,set
[<AllowNullLiteral>]
type P4ReadingsBulk() =
member val Message:String = null with get,set
member val TimeStamp:String = null with get,set
member val DayObjectCount:Nullable<Int32> = new Nullable<Int32>() with get,set
member val IntervalObjectCount:Nullable<Int32> = new Nullable<Int32>() with get,set
member val RejectionObjectCount:Nullable<Int32> = new Nullable<Int32>() with get,set
member val DayObjects:ResizeArray<P4ReadingDay> = null with get,set
member val IntervalObjects:ResizeArray<P4ReadingInterval> = null with get,set
member val RejectionObjects:ResizeArray<P4Rejection> = null with get,set
[<AllowNullLiteral>]
type 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")>]
member val ApiKey:String = null with get,set
type Filter =
| None = 0
| Hour = 1
| Day = 2
| LastDayOnly = 3
| Month = 4
[<AllowNullLiteral>]
type ReadingsBulk() =
inherit Generic()
interface 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")>]
member val From:String = null with get,set
///<summary>
///Include received interval objects in the result
///</summary>
[<ApiMember(DataType="Boolean, default: true", Description="Include received interval objects in the result", Name="IncludeIntervalObjects")>]
member val IncludeIntervalObjects:Boolean = new Boolean() with get,set
///<summary>
///Include received day objects in the result
///</summary>
[<ApiMember(DataType="Boolean, default: false", Description="Include received day objects in the result", Name="IncludeDayObjects")>]
member val IncludeDayObjects:Boolean = new Boolean() with get,set
///<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")>]
member val ObjectFilter:Filter = new Filter() with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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/json
HTTP/1.1 200 OK
Content-Type: application/json
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"}]}