| POST | /api/v1/external/nlfacility |
|---|
import Foundation
import ServiceStack
public class GetLobaroNlFacilityDeviceParsedData : Codable
{
// @ApiMember(IsRequired=true, ParameterType="body")
public var pagination:Pagination
// @ApiMember(IsRequired=true, ParameterType="body")
public var data:[LobaroData] = []
required public init(){}
}
public class Pagination : Codable
{
public var limit:Int
public var total:Int
public var offset:Int
required public init(){}
}
public class LobaroData : Codable
{
public var id:Int
public var deviceId:Int
public var createdAt:Date
public var updatedAt:Date
public var data:DeviceData
required public init(){}
}
public class DeviceData : Codable
{
public var mbus:DeviceMbusData
required public init(){}
}
public class DeviceMbusData : Codable
{
public var idString:Int
public var deviceString:String
public var body:MbusBody
public var header:Header
required public init(){}
}
public class MbusBody : Codable
{
public var dataRecords:[MbusBodyDataRecords] = []
required public init(){}
}
public class MbusBodyDataRecords : Codable
{
public var vifUnit:String
public var vifQuantity:String
public var valueScaled:Double
public var vifExponent:String
public var valueString:String
public var value:String
public var difFunctionString:String
public var storageNo:String
public var compactProfile:CompactProfile
required public init(){}
}
public class CompactProfile : Codable
{
public var history:[History] = []
required public init(){}
}
public class History : Codable
{
public var time:String
public var value:String
required public init(){}
}
public class Header : Codable
{
public var idString:Int
public var deviceString:String
required public init(){}
}
public class GetLobaroNlFacilityDeviceParsedDataResponse : Codable
{
public var responseStatus:ResponseStatus
required public init(){}
}
Swift GetLobaroNlFacilityDeviceParsedData DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/v1/external/nlfacility HTTP/1.1
Host: mitchell-servdesk.eras-online.de
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
pagination:
{
limit: 0,
total: 0,
offset: 0
},
data:
[
{
id: 0,
deviceId: 0,
createdAt: 0001-01-01T00:00:00Z,
updatedAt: 0001-01-01T00:00:00Z,
data:
{
mbus:
{
idString: 0,
deviceString: String,
body:
{
dataRecords:
[
{
vifUnit: String,
vifQuantity: String,
valueScaled: 0,
vifExponent: String,
valueString: String,
value: String,
difFunctionString: String,
storageNo: String,
compactProfile:
{
history:
[
{
time: String,
value: String
}
]
}
}
]
},
header:
{
idString: 0,
deviceString: String
}
}
}
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}