Server

<back to all web services

GetDevice

Devices
Requires Authentication
The following routes are available for this service:
GET/api/v1/devices/{Guid}
"use strict";
/** @typedef {'L'|'Kg'|'CBM'|'Stck'|'KWH'|'MWH'|'GWH'|'T'|'RM'|'Einheit'|'Qm'|'GJ'|'MJ'|'Null'|'St'|'Srm'|'Wh'} */
export var EinheitType;
(function (EinheitType) {
    EinheitType["L"] = "L"
    EinheitType["Kg"] = "Kg"
    EinheitType["CBM"] = "CBM"
    EinheitType["Stck"] = "Stck"
    EinheitType["KWH"] = "KWH"
    EinheitType["MWH"] = "MWH"
    EinheitType["GWH"] = "GWH"
    EinheitType["T"] = "T"
    EinheitType["RM"] = "RM"
    EinheitType["Einheit"] = "Einheit"
    EinheitType["Qm"] = "Qm"
    EinheitType["GJ"] = "GJ"
    EinheitType["MJ"] = "MJ"
    EinheitType["Null"] = "Null"
    EinheitType["St"] = "St"
    EinheitType["Srm"] = "Srm"
    EinheitType["Wh"] = "Wh"
})(EinheitType || (EinheitType = {}));
export class DeviceCatalog {
    /** @param {{Guid?:string,TypKurz?:string,TypLang?:string,Ablesbar?:boolean,Klasse?:string,Abzug?:boolean,Hkvv?:boolean,Funk?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Guid;
    /** @type {string} */
    TypKurz;
    /** @type {string} */
    TypLang;
    /** @type {boolean} */
    Ablesbar;
    /** @type {string} */
    Klasse;
    /** @type {boolean} */
    Abzug;
    /** @type {boolean} */
    Hkvv;
    /** @type {boolean} */
    Funk;
}
/** @typedef {'ZA'|'HA'|'MO'|'EB'|'AB'} */
export var DeviceReadingKind;
(function (DeviceReadingKind) {
    DeviceReadingKind["ZA"] = "ZA"
    DeviceReadingKind["HA"] = "HA"
    DeviceReadingKind["MO"] = "MO"
    DeviceReadingKind["EB"] = "EB"
    DeviceReadingKind["AB"] = "AB"
})(DeviceReadingKind || (DeviceReadingKind = {}));
export class DeviceConsumption {
    /** @param {{guid?:string,deviceReading?:number,deviceReadingDate?:string,deviceReadingKind?:DeviceReadingKind,changeDate?:string,note?:string,ampouleColour?:string,deviceGuid?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    guid;
    /** @type {?number} */
    deviceReading;
    /** @type {?string} */
    deviceReadingDate;
    /** @type {DeviceReadingKind} */
    deviceReadingKind;
    /** @type {?string} */
    changeDate;
    /** @type {string} */
    note;
    /** @type {string} */
    ampouleColour;
    /** @type {string} */
    deviceGuid;
}
export class Device {
    /** @param {{guid?:string,number?:string,label?:string,description?:string,installationDate?:string,deinstallationDate?:string,calibrationDate?:string,unit?:EinheitType,note?:string,deviceCatalog?:DeviceCatalog,deviceConsumptions?:DeviceConsumption[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    guid;
    /** @type {string} */
    number;
    /** @type {string} */
    label;
    /** @type {string} */
    description;
    /** @type {string} */
    installationDate;
    /** @type {?string} */
    deinstallationDate;
    /** @type {?string} */
    calibrationDate;
    /** @type {EinheitType} */
    unit;
    /** @type {string} */
    note;
    /** @type {DeviceCatalog} */
    deviceCatalog;
    /** @type {DeviceConsumption[]} */
    deviceConsumptions;
}
export class GetDeviceResponse {
    /** @param {{device?:Device,responseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {Device} */
    device;
    /** @type {ResponseStatus} */
    responseStatus;
}
export class GetDevice {
    /** @param {{bearerToken?:string,guid?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    bearerToken;
    /** @type {string} */
    guid;
}

JavaScript GetDevice 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 /api/v1/devices/{Guid} HTTP/1.1 
Host: mitchell-servdesk.eras-online.de 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	device: 
	{
		guid: 00000000000000000000000000000000,
		number: String,
		label: String,
		description: String,
		installationDate: 0001-01-01T00:00:00Z,
		deinstallationDate: 0001-01-01T00:00:00Z,
		calibrationDate: 0001-01-01T00:00:00Z,
		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:00Z,
				deviceReadingKind: ZA,
				changeDate: 0001-01-01T00:00:00Z,
				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
		}
	}
}