| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/Contact/{ContactId}/audit |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class ContactAuditEntry implements IConvertible
{
String? Action;
String? Who;
DateTime? At;
ContactAuditEntry({this.Action,this.Who,this.At});
ContactAuditEntry.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Action = json['Action'];
Who = json['Who'];
At = JsonConverters.fromJson(json['At'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Action': Action,
'Who': Who,
'At': JsonConverters.toJson(At,'DateTime',context!)
};
getTypeName() => "ContactAuditEntry";
TypeContext? context = _ctx;
}
class ContactAuditTrailResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<ContactAuditEntry>? Entries = [];
ContactAuditTrailResponse({this.ResponseStatus,this.Entries});
ContactAuditTrailResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Entries = JsonConverters.fromJson(json['Entries'],'List<ContactAuditEntry>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Entries': JsonConverters.toJson(Entries,'List<ContactAuditEntry>',context!)
};
getTypeName() => "ContactAuditTrailResponse";
TypeContext? context = _ctx;
}
class ContactAuditLogRequest implements IConvertible
{
int? ContactId;
String? Action;
ContactAuditLogRequest({this.ContactId,this.Action});
ContactAuditLogRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ContactId = json['ContactId'];
Action = json['Action'];
return this;
}
Map<String, dynamic> toJson() => {
'ContactId': ContactId,
'Action': Action
};
getTypeName() => "ContactAuditLogRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'ContactAuditEntry': TypeInfo(TypeOf.Class, create:() => ContactAuditEntry()),
'ContactAuditTrailResponse': TypeInfo(TypeOf.Class, create:() => ContactAuditTrailResponse()),
'List<ContactAuditEntry>': TypeInfo(TypeOf.Class, create:() => <ContactAuditEntry>[]),
'ContactAuditLogRequest': TypeInfo(TypeOf.Class, create:() => ContactAuditLogRequest()),
});
Dart ContactAuditLogRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Contact/{ContactId}/audit HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ContactId: 0,
Action: String
}
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
}
},
Entries:
[
{
Action: String,
Who: String,
At: 0001-01-01
}
]
}