regis

<back to all web services

AuditRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
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()),
});

Dart AuditRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
Content-Type: text/csv
Content-Length: length

{"uuid":"String","created_since_date":"0001-01-01T00:00:00.0000000","controller":"String","action":"String","item_id":"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"}},"audits":[{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"uuid":"String","ip_address":"String","url":"String","controller":"String","action":"String","item_id":"String","timestamp":"0001-01-01T00:00:00.0000000"}]}