Server

<back to all web services

GetDeviceList

Devices
Requires Authentication
The following routes are available for this service:
GET/api/v1/devices
namespace Eras2Web.Service.Desktop.Server.ServiceModel.Eras2Client.Models

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<DataContract>]
    [<AllowNullLiteral>]
    type Device() = 
        [<DataMember(Name="Guid")>]
        member val Guid:String = null with get,set

        [<DataMember(Name="Geraetenummer")>]
        member val Number:String = null with get,set

        [<DataMember(Name="Bezeichnung")>]
        member val Label:String = null with get,set

        [<DataMember(Name="Beschreibung")>]
        member val Description:String = null with get,set

        [<DataMember(Name="Einbaudatum")>]
        member val InstallationDate:DateTime = new DateTime() with get,set

        [<DataMember(Name="Ausbaudatum")>]
        member val DeinstallationDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set

        [<DataMember(Name="Eichdatum")>]
        member val CalibrationDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set

        [<DataMember(Name="Einheit")>]
        member val Unit:String = null with get,set

        [<DataMember(Name="Memo")>]
        member val Note:String = null with get,set

        [<DataMember(Name="DeviceCatalogGuid")>]
        member val DeviceCatalogGuid:String = null with get,set

    [<AllowNullLiteral>]
    type GetDeviceListResponse() = 
        member val DeviceList:IEnumerable<Device> = null with get,set
        member val ResponseStatus:ResponseStatus = null with get,set

    [<AllowNullLiteral>]
    type GetDeviceList() = 
        [<ApiMember(IsRequired=true, ParameterType="query")>]
        member val BearerToken:String = null with 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")>]
        member val FilterByObjektGuid:String = null with 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")>]
        member val FilterByNutzeinheitGuid:String = null with get,set

F# GetDeviceList 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 HTTP/1.1 
Host: messtechnik-horb-servdesk.eras-online.de 
Accept: text/jsv
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
		}
	}
}