Server

<back to all web services

GetDevice

Devices
Requires Authentication
The following routes are available for this service:
GET/api/v1/devices/{Guid}
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


open class GetDevice : IHasBearerToken
{
    @ApiMember(IsRequired=true, ParameterType="query")
    var bearerToken:String? = null

    @ApiMember(IsRequired=true, ParameterType="path")
    var guid:UUID? = null
}

open class GetDeviceResponse
{
    var device:Device? = null
    var responseStatus:ResponseStatus? = null
}

@DataContract
open class Device
{
    @DataMember
    var guid:UUID? = null

    @DataMember
    var number:String? = null

    @DataMember
    var label:String? = null

    @DataMember
    var description:String? = null

    @DataMember
    var installationDate:Date? = null

    @DataMember
    var deinstallationDate:Date? = null

    @DataMember
    var calibrationDate:Date? = null

    @DataMember
    var unit:EinheitType? = null

    @DataMember
    var note:String? = null

    @DataMember
    var deviceCatalog:DeviceCatalog? = null

    @DataMember
    var deviceConsumptions:ArrayList<DeviceConsumption> = ArrayList<DeviceConsumption>()
}

enum class EinheitType
{
    L,
    Kg,
    Cbm,
    Stck,
    Kwh,
    Mwh,
    Gwh,
    T,
    Rm,
    Einheit,
    Qm,
    Gj,
    Mj,
    Null,
    St,
    Srm,
    Wh,
}

@DataContract
open class DeviceCatalog
{
    @DataMember(Name="Guid")
    @SerializedName("Guid")
    var guid:String? = null

    @DataMember(Name="TypKurz")
    @SerializedName("TypKurz")
    var typeShort:String? = null

    @DataMember(Name="TypLang")
    @SerializedName("TypLang")
    var typeLong:String? = null

    @DataMember(Name="Ablesbar")
    @SerializedName("Ablesbar")
    var readable:Boolean? = null

    @DataMember(Name="Klasse")
    @SerializedName("Klasse")
    @SerializedName("class") var Class:String? = null

    @DataMember(Name="Abzug")
    @SerializedName("Abzug")
    var subtraction:Boolean? = null

    @DataMember(Name="Hkvv")
    @SerializedName("Hkvv")
    var hkvv:Boolean? = null

    @DataMember(Name="Funk")
    @SerializedName("Funk")
    var radio:Boolean? = null
}

@DataContract
open class DeviceConsumption
{
    @DataMember
    var guid:UUID? = null

    @DataMember
    var deviceReading:Double? = null

    @DataMember
    var deviceReadingDate:Date? = null

    @DataMember
    var deviceReadingKind:DeviceReadingKind? = null

    @DataMember
    var changeDate:Date? = null

    @DataMember
    var note:String? = null

    @DataMember
    var ampouleColour:String? = null

    @DataMember
    var deviceGuid:String? = null
}

enum class DeviceReadingKind
{
    Za,
    Ha,
    Mo,
    Eb,
    Ab,
}

Kotlin GetDevice DTOs

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

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/v1/devices/{Guid} HTTP/1.1 
Host: immo-account-servdesk.eras-online.de 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"device":{"guid":"00000000000000000000000000000000","number":"String","label":"String","description":"String","installationDate":"0001-01-01T00:00:00.0000000Z","deinstallationDate":"0001-01-01T00:00:00.0000000Z","calibrationDate":"0001-01-01T00:00:00.0000000Z","unit":"L","note":"String","deviceCatalog":{"Guid":"String","TypKurz":"String","TypLang":"String","Ablesbar":false,"Klasse":"String","Abzug":false,"Hkvv":false,"Funk":false},"deviceConsumptions":[{"guid":"00000000000000000000000000000000","deviceReading":0,"deviceReadingDate":"0001-01-01T00:00:00.0000000Z","deviceReadingKind":"ZA","changeDate":"0001-01-01T00:00:00.0000000Z","note":"String","ampouleColour":"String","deviceGuid":"String"}]},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}