Server

<back to all web services

GetDeviceConsumption

Deviceconsumptions
Requires Authentication
The following routes are available for this service:
GET/api/v1/deviceconsumptions/{Guid}
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Get;
using Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Models;
using Eras2Web.Service.Desktop.Server.ServiceModel.Enums;

namespace Eras2Web.Service.Desktop.Server.ServiceModel.Enums
{
    public enum DeviceReadingKind
    {
        ZA,
        HA,
        MO,
        EB,
        AB,
    }

}

namespace Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Get
{
    public partial class GetDeviceConsumption
        : IHasBearerToken
    {
        [ApiMember(IsRequired=true, ParameterType="query")]
        public virtual string BearerToken { get; set; }

        [ApiMember(IsRequired=true, ParameterType="path")]
        public virtual Guid Guid { get; set; }
    }

    public partial class GetDeviceConsumptionResponse
    {
        public virtual DeviceConsumption DeviceConsumption { get; set; }
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

namespace Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Models
{
    [DataContract]
    public partial class DeviceConsumption
    {
        [DataMember]
        public virtual Guid Guid { get; set; }

        [DataMember]
        public virtual double? DeviceReading { get; set; }

        [DataMember]
        public virtual DateTime? DeviceReadingDate { get; set; }

        [DataMember]
        public virtual DeviceReadingKind DeviceReadingKind { get; set; }

        [DataMember]
        public virtual DateTime? ChangeDate { get; set; }

        [DataMember]
        public virtual string Note { get; set; }

        [DataMember]
        public virtual string AmpouleColour { get; set; }

        [DataMember]
        public virtual string DeviceGuid { get; set; }
    }

}

C# GetDeviceConsumption 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/deviceconsumptions/{Guid} HTTP/1.1 
Host: marneth-messdienst-servdesk.eras-online.de 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"deviceConsumption":{"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"}}}