| Requires any of the roles: | Agent, Administrator |
| GET, DELETE, OPTIONS | /v1/AgentDevice/{DeviceId} | ||
|---|---|---|---|
| POST, OPTIONS | /v1/AgentDevice |
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class AgentDevice implements IConvertible
{
int? AgentDeviceId;
String? UserId;
String? DeviceId;
String? Model;
String? Platform;
String? UUID;
AgentDevice({this.AgentDeviceId,this.UserId,this.DeviceId,this.Model,this.Platform,this.UUID});
AgentDevice.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AgentDeviceId = json['AgentDeviceId'];
UserId = json['UserId'];
DeviceId = json['DeviceId'];
Model = json['Model'];
Platform = json['Platform'];
UUID = json['UUID'];
return this;
}
Map<String, dynamic> toJson() => {
'AgentDeviceId': AgentDeviceId,
'UserId': UserId,
'DeviceId': DeviceId,
'Model': Model,
'Platform': Platform,
'UUID': UUID
};
getTypeName() => "AgentDevice";
TypeContext? context = _ctx;
}
class AgentDeviceResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
AgentDevice? AgentDevice;
AgentDeviceResponse({this.ResponseStatus,this.AgentDevice});
AgentDeviceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
AgentDevice = JsonConverters.fromJson(json['AgentDevice'],'AgentDevice',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'AgentDevice': JsonConverters.toJson(AgentDevice,'AgentDevice',context!)
};
getTypeName() => "AgentDeviceResponse";
TypeContext? context = _ctx;
}
class AgentDeviceRequest implements IConvertible
{
AgentDevice? AgentDevice;
String? DeviceId;
AgentDeviceRequest({this.AgentDevice,this.DeviceId});
AgentDeviceRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AgentDevice = JsonConverters.fromJson(json['AgentDevice'],'AgentDevice',context!);
DeviceId = json['DeviceId'];
return this;
}
Map<String, dynamic> toJson() => {
'AgentDevice': JsonConverters.toJson(AgentDevice,'AgentDevice',context!),
'DeviceId': DeviceId
};
getTypeName() => "AgentDeviceRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'AgentDevice': TypeInfo(TypeOf.Class, create:() => AgentDevice()),
'AgentDeviceResponse': TypeInfo(TypeOf.Class, create:() => AgentDeviceResponse()),
'AgentDeviceRequest': TypeInfo(TypeOf.Class, create:() => AgentDeviceRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/AgentDevice HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"AgentDevice":{"AgentDeviceId":0,"UserId":"00000000000000000000000000000000","DeviceId":"String","Model":"String","Platform":"String","UUID":"String"},"DeviceId":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"AgentDevice":{"AgentDeviceId":0,"UserId":"00000000000000000000000000000000","DeviceId":"String","Model":"String","Platform":"String","UUID":"String"}}