Required role: | REGISUserRole |
POST | /Audit |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class AuditResponse implements IConvertible
{
ResponseStatus? responseStatus;
String? uuid;
String? ip_address;
String? url;
String? controller;
String? action;
String? item_id;
DateTime? timestamp;
AuditResponse({this.responseStatus,this.uuid,this.ip_address,this.url,this.controller,this.action,this.item_id,this.timestamp});
AuditResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
uuid = json['uuid'];
ip_address = json['ip_address'];
url = json['url'];
controller = json['controller'];
action = json['action'];
item_id = json['item_id'];
timestamp = JsonConverters.fromJson(json['timestamp'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'uuid': uuid,
'ip_address': ip_address,
'url': url,
'controller': controller,
'action': action,
'item_id': item_id,
'timestamp': JsonConverters.toJson(timestamp,'DateTime',context!)
};
getTypeName() => "AuditResponse";
TypeContext? context = _ctx;
}
class AuditsResponse implements IConvertible
{
ResponseStatus? responseStatus;
List<AuditResponse>? audits;
AuditsResponse({this.responseStatus,this.audits});
AuditsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
audits = JsonConverters.fromJson(json['audits'],'List<AuditResponse>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'audits': JsonConverters.toJson(audits,'List<AuditResponse>',context!)
};
getTypeName() => "AuditsResponse";
TypeContext? context = _ctx;
}
class AuditRequest implements IConvertible
{
String? uuid;
DateTime? created_since_date;
String? controller;
String? action;
String? item_id;
AuditRequest({this.uuid,this.created_since_date,this.controller,this.action,this.item_id});
AuditRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
uuid = json['uuid'];
created_since_date = JsonConverters.fromJson(json['created_since_date'],'DateTime',context!);
controller = json['controller'];
action = json['action'];
item_id = json['item_id'];
return this;
}
Map<String, dynamic> toJson() => {
'uuid': uuid,
'created_since_date': JsonConverters.toJson(created_since_date,'DateTime',context!),
'controller': controller,
'action': action,
'item_id': item_id
};
getTypeName() => "AuditRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
'AuditResponse': TypeInfo(TypeOf.Class, create:() => AuditResponse()),
'AuditsResponse': TypeInfo(TypeOf.Class, create:() => AuditsResponse()),
'List<AuditResponse>': TypeInfo(TypeOf.Class, create:() => <AuditResponse>[]),
'AuditRequest': TypeInfo(TypeOf.Class, create:() => AuditRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Audit HTTP/1.1
Host: data.regent-college.edu
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<AuditRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
<action>String</action>
<controller>String</controller>
<created_since_date>0001-01-01T00:00:00</created_since_date>
<item_id>String</item_id>
<uuid>String</uuid>
</AuditRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <AuditsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Responses"> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> <audits> <AuditResponse> <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types"> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:Message>String</d4p1:Message> <d4p1:StackTrace>String</d4p1:StackTrace> <d4p1:Errors> <d4p1:ResponseError> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:FieldName>String</d4p1:FieldName> <d4p1:Message>String</d4p1:Message> <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:KeyValueOfstringstring> <d7p1:Key>String</d7p1:Key> <d7p1:Value>String</d7p1:Value> </d7p1:KeyValueOfstringstring> </d4p1:Meta> </d4p1:ResponseError> </d4p1:Errors> <d4p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d4p1:Meta> </ResponseStatus> <action>String</action> <controller>String</controller> <ip_address>String</ip_address> <item_id>String</item_id> <timestamp>0001-01-01T00:00:00</timestamp> <url>String</url> <uuid>String</uuid> </AuditResponse> </audits> </AuditsResponse>