<back to all web services

GetRootMethods

The following routes are available for this service:
GET/RestApi/diagnostics/methods
import 'package:servicestack/servicestack.dart';

class GetRootMethods implements IConvertible
{
    String? RootOperationId;
    String? Category;

    GetRootMethods({this.RootOperationId,this.Category});
    GetRootMethods.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        RootOperationId = json['RootOperationId'];
        Category = json['Category'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'RootOperationId': RootOperationId,
        'Category': Category
    };

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

class MethodViewModel implements IConvertible
{
    String? Id;
    String? RootOperationId;
    String? ParentOperationId;
    String? Method;
    DateTime? Start;
    DateTime? End;
    double? Duration;
    int? QueryCount;
    bool? HasChildren;

    MethodViewModel({this.Id,this.RootOperationId,this.ParentOperationId,this.Method,this.Start,this.End,this.Duration,this.QueryCount,this.HasChildren});
    MethodViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        RootOperationId = json['RootOperationId'];
        ParentOperationId = json['ParentOperationId'];
        Method = json['Method'];
        Start = JsonConverters.fromJson(json['Start'],'DateTime',context!);
        End = JsonConverters.fromJson(json['End'],'DateTime',context!);
        Duration = JsonConverters.toDouble(json['Duration']);
        QueryCount = json['QueryCount'];
        HasChildren = json['HasChildren'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'RootOperationId': RootOperationId,
        'ParentOperationId': ParentOperationId,
        'Method': Method,
        'Start': JsonConverters.toJson(Start,'DateTime',context!),
        'End': JsonConverters.toJson(End,'DateTime',context!),
        'Duration': Duration,
        'QueryCount': QueryCount,
        'HasChildren': HasChildren
    };

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

class MethodsProxy implements IConvertible
{
    List<MethodViewModel>? Items;

    MethodsProxy({this.Items});
    MethodsProxy.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Items = JsonConverters.fromJson(json['Items'],'List<MethodViewModel>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Items': JsonConverters.toJson(Items,'List<MethodViewModel>',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
    'GetRootMethods': TypeInfo(TypeOf.Class, create:() => GetRootMethods()),
    'MethodViewModel': TypeInfo(TypeOf.Class, create:() => MethodViewModel()),
    'MethodsProxy': TypeInfo(TypeOf.Class, create:() => MethodsProxy()),
    'List<MethodViewModel>': TypeInfo(TypeOf.Class, create:() => <MethodViewModel>[]),
});

Dart GetRootMethods DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /RestApi/diagnostics/methods HTTP/1.1 
Host: www.asg.com.au 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{}