Server

<back to all web services

GetDeviceList

Devices
Requires Authentication
The following routes are available for this service:
GET/api/v1/devices
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.Eras2Client.Models;

namespace Eras2Web.Service.Desktop.Server.ServiceModel.Eras2Client.Models
{
    [DataContract]
    public partial class Device
    {
        [DataMember(Name="Guid")]
        public virtual string Guid { get; set; }

        [DataMember(Name="Geraetenummer")]
        public virtual string Number { get; set; }

        [DataMember(Name="Bezeichnung")]
        public virtual string Label { get; set; }

        [DataMember(Name="Beschreibung")]
        public virtual string Description { get; set; }

        [DataMember(Name="Einbaudatum")]
        public virtual DateTime InstallationDate { get; set; }

        [DataMember(Name="Ausbaudatum")]
        public virtual DateTime? DeinstallationDate { get; set; }

        [DataMember(Name="Eichdatum")]
        public virtual DateTime? CalibrationDate { get; set; }

        [DataMember(Name="Einheit")]
        public virtual string Unit { get; set; }

        [DataMember(Name="Memo")]
        public virtual string Note { get; set; }

        [DataMember(Name="DeviceCatalogGuid")]
        public virtual string DeviceCatalogGuid { get; set; }
    }

}

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

        ///<summary>
        ///Optional! Follow the format : /api/v1/devices?filter[ObjektGuid]=*
        ///</summary>
        [DataMember(Name="filter[ObjektGuid]")]
        [ApiMember(Description="Optional! Follow the format : /api/v1/devices?filter[ObjektGuid]=*", ParameterType="query")]
        public virtual string FilterByObjektGuid { get; set; }

        ///<summary>
        ///Optional! Follow the format : /api/v1/devices?filter[NutzerGuid]=*
        ///</summary>
        [DataMember(Name="filter[NutzerGuid]")]
        [ApiMember(Description="Optional! Follow the format : /api/v1/devices?filter[NutzerGuid]=*", ParameterType="query")]
        public virtual string FilterByNutzeinheitGuid { get; set; }
    }

    public partial class GetDeviceListResponse
    {
        public virtual IEnumerable<Device> DeviceList { get; set; }
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

C# GetDeviceList DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /api/v1/devices HTTP/1.1 
Host: emg-servdesk.eras-online.de 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}