BokaMera.API.Host

<back to all web services

CreateError

The following routes are available for this service:
POST/errors/Save error to log
import 'package:servicestack/servicestack.dart';

class ErrorQueryResponse implements IConvertible
{
    String? CompanyId;
    int? Id;
    String? ExceptionName;
    String? ExceptionMessage;
    String? ExceptionSource;
    String? InnerExceptionName;
    String? StackTrace;
    String? URL;
    String? LoggedInUser;
    bool? Visible;
    String? IPAddress;
    DateTime? CreatedDate;
    String? Request;
    String? Session;

    ErrorQueryResponse({this.CompanyId,this.Id,this.ExceptionName,this.ExceptionMessage,this.ExceptionSource,this.InnerExceptionName,this.StackTrace,this.URL,this.LoggedInUser,this.Visible,this.IPAddress,this.CreatedDate,this.Request,this.Session});
    ErrorQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        Id = json['Id'];
        ExceptionName = json['ExceptionName'];
        ExceptionMessage = json['ExceptionMessage'];
        ExceptionSource = json['ExceptionSource'];
        InnerExceptionName = json['InnerExceptionName'];
        StackTrace = json['StackTrace'];
        URL = json['URL'];
        LoggedInUser = json['LoggedInUser'];
        Visible = json['Visible'];
        IPAddress = json['IPAddress'];
        CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!);
        Request = json['Request'];
        Session = json['Session'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'Id': Id,
        'ExceptionName': ExceptionName,
        'ExceptionMessage': ExceptionMessage,
        'ExceptionSource': ExceptionSource,
        'InnerExceptionName': InnerExceptionName,
        'StackTrace': StackTrace,
        'URL': URL,
        'LoggedInUser': LoggedInUser,
        'Visible': Visible,
        'IPAddress': IPAddress,
        'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!),
        'Request': Request,
        'Session': Session
    };

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

class CreateError implements ICompany, IConvertible
{
    /**
    * The company id, if empty will use the company id for the user you are logged in with.
    */
    // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
    String? CompanyId;

    /**
    * 
    */
    // @ApiMember(Description="", IsRequired=true)
    String? ExceptionName;

    /**
    * 
    */
    // @ApiMember(Description="", IsRequired=true)
    String? ExceptionMessage;

    /**
    * 
    */
    // @ApiMember(Description="")
    String? ExceptionSource;

    /**
    * 
    */
    // @ApiMember(Description="", IsRequired=true)
    String? InnerExceptionName;

    /**
    * 
    */
    // @ApiMember(Description="", IsRequired=true)
    String? StackTrace;

    /**
    * 
    */
    // @ApiMember(Description="", IsRequired=true)
    String? URL;

    /**
    * 
    */
    // @ApiMember(Description="")
    String? LoggedInUser;

    /**
    * 
    */
    // @ApiMember(Description="")
    String? IPAddress;

    /**
    * 
    */
    // @ApiMember(Description="")
    String? Request;

    /**
    * 
    */
    // @ApiMember(Description="")
    String? Session;

    CreateError({this.CompanyId,this.ExceptionName,this.ExceptionMessage,this.ExceptionSource,this.InnerExceptionName,this.StackTrace,this.URL,this.LoggedInUser,this.IPAddress,this.Request,this.Session});
    CreateError.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        ExceptionName = json['ExceptionName'];
        ExceptionMessage = json['ExceptionMessage'];
        ExceptionSource = json['ExceptionSource'];
        InnerExceptionName = json['InnerExceptionName'];
        StackTrace = json['StackTrace'];
        URL = json['URL'];
        LoggedInUser = json['LoggedInUser'];
        IPAddress = json['IPAddress'];
        Request = json['Request'];
        Session = json['Session'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'ExceptionName': ExceptionName,
        'ExceptionMessage': ExceptionMessage,
        'ExceptionSource': ExceptionSource,
        'InnerExceptionName': InnerExceptionName,
        'StackTrace': StackTrace,
        'URL': URL,
        'LoggedInUser': LoggedInUser,
        'IPAddress': IPAddress,
        'Request': Request,
        'Session': Session
    };

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

TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
    'ErrorQueryResponse': TypeInfo(TypeOf.Class, create:() => ErrorQueryResponse()),
    'CreateError': TypeInfo(TypeOf.Class, create:() => CreateError()),
});

Dart CreateError 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 /errors/ HTTP/1.1 
Host: api.bokamera.se 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","ExceptionName":"String","ExceptionMessage":"String","ExceptionSource":"String","InnerExceptionName":"String","StackTrace":"String","URL":"String","LoggedInUser":"String","IPAddress":"String","Request":"String","Session":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Id":0,"ExceptionName":"String","ExceptionMessage":"String","ExceptionSource":"String","InnerExceptionName":"String","StackTrace":"String","URL":"String","LoggedInUser":"String","Visible":false,"IPAddress":"String","Request":"String","Session":"String"}