BazeField Services

<back to all web services

DeviceInfoGetRequest

Configuration API
Requires Authentication
The following routes are available for this service:
GET, POST/configuration/objects/{ObjectIds}/devices
import 'package:servicestack/servicestack.dart';

class DeviceInfoEntity implements IConvertible
{
    int? id;
    String? description;
    String? name;
    int? loadOrder;
    String? nodeId;
    String? nodeName;
    int? protocolId;
    String? protocolName;
    String? connectionString;

    DeviceInfoEntity({this.id,this.description,this.name,this.loadOrder,this.nodeId,this.nodeName,this.protocolId,this.protocolName,this.connectionString});
    DeviceInfoEntity.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        description = json['description'];
        name = json['name'];
        loadOrder = json['loadOrder'];
        nodeId = json['nodeId'];
        nodeName = json['nodeName'];
        protocolId = json['protocolId'];
        protocolName = json['protocolName'];
        connectionString = json['connectionString'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'description': description,
        'name': name,
        'loadOrder': loadOrder,
        'nodeId': nodeId,
        'nodeName': nodeName,
        'protocolId': protocolId,
        'protocolName': protocolName,
        'connectionString': connectionString
    };

    getTypeName() => "DeviceInfoEntity";
    TypeContext? context = _ctx;
}

class DeviceInfoGetResponse implements IConvertible
{
    Map<int,DeviceInfoEntity?>? devices;

    DeviceInfoGetResponse({this.devices});
    DeviceInfoGetResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        devices = JsonConverters.fromJson(json['devices'],'Map<int,DeviceInfoEntity?>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'devices': JsonConverters.toJson(devices,'Map<int,DeviceInfoEntity?>',context!)
    };

    getTypeName() => "DeviceInfoGetResponse";
    TypeContext? context = _ctx;
}

class DeviceInfoGetRequest implements IConvertible
{
    List<String>? objectIds;

    DeviceInfoGetRequest({this.objectIds});
    DeviceInfoGetRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        objectIds = JsonConverters.fromJson(json['objectIds'],'List<String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'objectIds': JsonConverters.toJson(objectIds,'List<String>',context!)
    };

    getTypeName() => "DeviceInfoGetRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'monitoring.ox2.com', types: <String, TypeInfo> {
    'DeviceInfoEntity': TypeInfo(TypeOf.Class, create:() => DeviceInfoEntity()),
    'DeviceInfoGetResponse': TypeInfo(TypeOf.Class, create:() => DeviceInfoGetResponse()),
    'Map<int,DeviceInfoEntity?>': TypeInfo(TypeOf.Class, create:() => Map<int,DeviceInfoEntity?>()),
    'DeviceInfoGetRequest': TypeInfo(TypeOf.Class, create:() => DeviceInfoGetRequest()),
});

Dart DeviceInfoGetRequest 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.

POST /configuration/objects/{ObjectIds}/devices HTTP/1.1 
Host: monitoring.ox2.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	objectIds: 
	[
		String
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	devices: 
	{
		0: 
		{
			id: 0,
			description: String,
			name: String,
			loadOrder: 0,
			nodeName: String,
			protocolId: 0,
			protocolName: String,
			connectionString: String
		}
	}
}