<back to all web services

ReadingsBulk

The following routes are available for this service:
GET/v8/readings-bulk
GET/v8/readings-bulk/{from}

export class Generic
{
    /** @description 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 apiKey: string;

    public constructor(init?: Partial<Generic>) { (Object as any).assign(this, init); }
}

export class P4ReadingDay
{
    public ean: string;
    public meterId: string;
    public queryDate: string;
    public measureUnit: string;
    public r180?: number;
    public r181?: number;
    public r182?: number;
    public r280?: number;
    public r281?: number;
    public r282?: number;

    public constructor(init?: Partial<P4ReadingDay>) { (Object as any).assign(this, init); }
}

export class P4ReadingIntervalItem
{
    public dateTimeOffset: string;
    public r180: number;
    public r280?: number;

    public constructor(init?: Partial<P4ReadingIntervalItem>) { (Object as any).assign(this, init); }
}

export class P4ReadingInterval
{
    public ean: string;
    public meterId: string;
    public queryDate: string;
    public measureUnit: string;
    public items: P4ReadingIntervalItem[];

    public constructor(init?: Partial<P4ReadingInterval>) { (Object as any).assign(this, init); }
}

export class P4Rejection
{
    public ean: string;
    public queryDate: string;
    public queryReason: string;
    public rejectionCode: string;
    public rejectionText: string;

    public constructor(init?: Partial<P4Rejection>) { (Object as any).assign(this, init); }
}

export class P4ReadingsBulk
{
    public message?: string;
    public timeStamp: string;
    public dayObjectCount?: number;
    public intervalObjectCount?: number;
    public rejectionObjectCount?: number;
    public dayObjects?: P4ReadingDay[];
    public intervalObjects?: P4ReadingInterval[];
    public rejectionObjects?: P4Rejection[];

    public constructor(init?: Partial<P4ReadingsBulk>) { (Object as any).assign(this, init); }
}

export enum Filter
{
    None = 'None',
    Hour = 'Hour',
    Day = 'Day',
    LastDayOnly = 'LastDayOnly',
    Month = 'Month',
}

export class ReadingsBulk extends Generic implements IGet
{
    /** @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! */
    // @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 from?: string;

    /** @description Include received interval objects in the result */
    // @ApiMember(DataType="Boolean, default: true", Description="Include received interval objects in the result", Name="IncludeIntervalObjects")
    public includeIntervalObjects: boolean;

    /** @description Include received day objects in the result */
    // @ApiMember(DataType="Boolean, default: false", Description="Include received day objects in the result", Name="IncludeDayObjects")
    public includeDayObjects: boolean;

    /** @description 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 objectFilter: Filter;

    public constructor(init?: Partial<ReadingsBulk>) { super(init); (Object as any).assign(this, init); }
}

TypeScript ReadingsBulk DTOs

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

HTTP + JSV

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/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
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.0000000+00:00,
					r180: 0,
					r280: 0
				}
			]
		}
	],
	rejectionObjects: 
	[
		{
			ean: String,
			queryDate: 0001-01-01,
			queryReason: String,
			rejectionCode: String,
			rejectionText: String
		}
	]
}