| GET | /v8/readings-bulk | ||
|---|---|---|---|
| GET | /v8/readings-bulk/{from} |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class ReadingsBulk extends Generic implements 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")
public String from = null;
/**
* Include received interval objects in the result
*/
@ApiMember(DataType="Boolean, default: true", Description="Include received interval objects in the result", Name="IncludeIntervalObjects")
public Boolean includeIntervalObjects = null;
/**
* Include received day objects in the result
*/
@ApiMember(DataType="Boolean, default: false", Description="Include received day objects in the result", Name="IncludeDayObjects")
public Boolean includeDayObjects = 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")
public Filter objectFilter = null;
public String getFrom() { return from; }
public ReadingsBulk setFrom(String value) { this.from = value; return this; }
public Boolean isIncludeIntervalObjects() { return includeIntervalObjects; }
public ReadingsBulk setIncludeIntervalObjects(Boolean value) { this.includeIntervalObjects = value; return this; }
public Boolean isIncludeDayObjects() { return includeDayObjects; }
public ReadingsBulk setIncludeDayObjects(Boolean value) { this.includeDayObjects = value; return this; }
public Filter getObjectFilter() { return objectFilter; }
public ReadingsBulk setObjectFilter(Filter value) { this.objectFilter = value; return this; }
}
public static 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")
public String apiKey = null;
public String getApiKey() { return apiKey; }
public Generic setApiKey(String value) { this.apiKey = value; return this; }
}
public static enum Filter
{
None,
Hour,
Day,
LastDayOnly,
Month;
}
public static class P4ReadingsBulk
{
public String message = null;
public String timeStamp = null;
public Integer dayObjectCount = null;
public Integer intervalObjectCount = null;
public Integer rejectionObjectCount = null;
public ArrayList<P4ReadingDay> dayObjects = null;
public ArrayList<P4ReadingInterval> intervalObjects = null;
public ArrayList<P4Rejection> rejectionObjects = null;
public String getMessage() { return message; }
public P4ReadingsBulk setMessage(String value) { this.message = value; return this; }
public String getTimeStamp() { return timeStamp; }
public P4ReadingsBulk setTimeStamp(String value) { this.timeStamp = value; return this; }
public Integer getDayObjectCount() { return dayObjectCount; }
public P4ReadingsBulk setDayObjectCount(Integer value) { this.dayObjectCount = value; return this; }
public Integer getIntervalObjectCount() { return intervalObjectCount; }
public P4ReadingsBulk setIntervalObjectCount(Integer value) { this.intervalObjectCount = value; return this; }
public Integer getRejectionObjectCount() { return rejectionObjectCount; }
public P4ReadingsBulk setRejectionObjectCount(Integer value) { this.rejectionObjectCount = value; return this; }
public ArrayList<P4ReadingDay> getDayObjects() { return dayObjects; }
public P4ReadingsBulk setDayObjects(ArrayList<P4ReadingDay> value) { this.dayObjects = value; return this; }
public ArrayList<P4ReadingInterval> getIntervalObjects() { return intervalObjects; }
public P4ReadingsBulk setIntervalObjects(ArrayList<P4ReadingInterval> value) { this.intervalObjects = value; return this; }
public ArrayList<P4Rejection> getRejectionObjects() { return rejectionObjects; }
public P4ReadingsBulk setRejectionObjects(ArrayList<P4Rejection> value) { this.rejectionObjects = value; return this; }
}
public static class P4ReadingDay
{
public String ean = null;
public String meterId = null;
public Date queryDate = null;
public String measureUnit = null;
public BigDecimal r180 = null;
public BigDecimal r181 = null;
public BigDecimal r182 = null;
public BigDecimal r280 = null;
public BigDecimal r281 = null;
public BigDecimal r282 = null;
public String getEan() { return ean; }
public P4ReadingDay setEan(String value) { this.ean = value; return this; }
public String getMeterId() { return meterId; }
public P4ReadingDay setMeterId(String value) { this.meterId = value; return this; }
public Date getQueryDate() { return queryDate; }
public P4ReadingDay setQueryDate(Date value) { this.queryDate = value; return this; }
public String getMeasureUnit() { return measureUnit; }
public P4ReadingDay setMeasureUnit(String value) { this.measureUnit = value; return this; }
public BigDecimal getR180() { return r180; }
public P4ReadingDay setR180(BigDecimal value) { this.r180 = value; return this; }
public BigDecimal getR181() { return r181; }
public P4ReadingDay setR181(BigDecimal value) { this.r181 = value; return this; }
public BigDecimal getR182() { return r182; }
public P4ReadingDay setR182(BigDecimal value) { this.r182 = value; return this; }
public BigDecimal getR280() { return r280; }
public P4ReadingDay setR280(BigDecimal value) { this.r280 = value; return this; }
public BigDecimal getR281() { return r281; }
public P4ReadingDay setR281(BigDecimal value) { this.r281 = value; return this; }
public BigDecimal getR282() { return r282; }
public P4ReadingDay setR282(BigDecimal value) { this.r282 = value; return this; }
}
public static class P4ReadingInterval
{
public String ean = null;
public String meterId = null;
public Date queryDate = null;
public String measureUnit = null;
public ArrayList<P4ReadingIntervalItem> items = null;
public String getEan() { return ean; }
public P4ReadingInterval setEan(String value) { this.ean = value; return this; }
public String getMeterId() { return meterId; }
public P4ReadingInterval setMeterId(String value) { this.meterId = value; return this; }
public Date getQueryDate() { return queryDate; }
public P4ReadingInterval setQueryDate(Date value) { this.queryDate = value; return this; }
public String getMeasureUnit() { return measureUnit; }
public P4ReadingInterval setMeasureUnit(String value) { this.measureUnit = value; return this; }
public ArrayList<P4ReadingIntervalItem> getItems() { return items; }
public P4ReadingInterval setItems(ArrayList<P4ReadingIntervalItem> value) { this.items = value; return this; }
}
public static class P4ReadingIntervalItem
{
public Date dateTimeOffset = null;
public BigDecimal r180 = null;
public BigDecimal r280 = null;
public Date getDateTimeOffset() { return dateTimeOffset; }
public P4ReadingIntervalItem setDateTimeOffset(Date value) { this.dateTimeOffset = value; return this; }
public BigDecimal getR180() { return r180; }
public P4ReadingIntervalItem setR180(BigDecimal value) { this.r180 = value; return this; }
public BigDecimal getR280() { return r280; }
public P4ReadingIntervalItem setR280(BigDecimal value) { this.r280 = value; return this; }
}
public static class P4Rejection
{
public String ean = null;
public Date queryDate = null;
public String queryReason = null;
public String rejectionCode = null;
public String rejectionText = null;
public String getEan() { return ean; }
public P4Rejection setEan(String value) { this.ean = value; return this; }
public Date getQueryDate() { return queryDate; }
public P4Rejection setQueryDate(Date value) { this.queryDate = value; return this; }
public String getQueryReason() { return queryReason; }
public P4Rejection setQueryReason(String value) { this.queryReason = value; return this; }
public String getRejectionCode() { return rejectionCode; }
public P4Rejection setRejectionCode(String value) { this.rejectionCode = value; return this; }
public String getRejectionText() { return rejectionText; }
public P4Rejection setRejectionText(String value) { this.rejectionText = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=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"}]}