<back to all web services

GetService

The following routes are available for this service:
GET/RestApi/apiservice/services/{Route}/{UrlName}
import 'package:servicestack/servicestack.dart';

class GetService implements IConvertible
{
    String? UrlName;
    String? Route;

    GetService({this.UrlName,this.Route});
    GetService.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'UrlName': UrlName,
        'Route': Route
    };

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

class PropertiesProxy implements IConvertible
{
    String? Name;
    String? PropertyType;
    bool? IsPersistent;
    bool? AllowSort;
    bool? AllowFilter;
    bool? IsKey;

    PropertiesProxy({this.Name,this.PropertyType,this.IsPersistent,this.AllowSort,this.AllowFilter,this.IsKey});
    PropertiesProxy.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        PropertyType = json['PropertyType'];
        IsPersistent = json['IsPersistent'];
        AllowSort = json['AllowSort'];
        AllowFilter = json['AllowFilter'];
        IsKey = json['IsKey'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'PropertyType': PropertyType,
        'IsPersistent': IsPersistent,
        'AllowSort': AllowSort,
        'AllowFilter': AllowFilter,
        'IsKey': IsKey
    };

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

class ContentsProxy implements IConvertible
{
    String? Name;
    bool? ReadOnly;
    String? UrlKey;
    String? ClrType;
    String? Access;
    List<PropertiesProxy>? Properties;
    List<ContentsProxy>? Children;
    bool? AutogenerateProperties;
    String? parentId;

    ContentsProxy({this.Name,this.ReadOnly,this.UrlKey,this.ClrType,this.Access,this.Properties,this.Children,this.AutogenerateProperties,this.parentId});
    ContentsProxy.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        ReadOnly = json['ReadOnly'];
        UrlKey = json['UrlKey'];
        ClrType = json['ClrType'];
        Access = json['Access'];
        Properties = JsonConverters.fromJson(json['Properties'],'List<PropertiesProxy>',context!);
        Children = JsonConverters.fromJson(json['Children'],'List<ContentsProxy>',context!);
        AutogenerateProperties = json['AutogenerateProperties'];
        parentId = json['parentId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'ReadOnly': ReadOnly,
        'UrlKey': UrlKey,
        'ClrType': ClrType,
        'Access': Access,
        'Properties': JsonConverters.toJson(Properties,'List<PropertiesProxy>',context!),
        'Children': JsonConverters.toJson(Children,'List<ContentsProxy>',context!),
        'AutogenerateProperties': AutogenerateProperties,
        'parentId': parentId
    };

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

class ServicesProxy implements IConvertible
{
    String? Name;
    String? Route;
    String? UrlName;
    bool? Enabled;
    String? Access;
    String? ApiKey;
    String? AccessControlAllowOrigin;
    bool? AutogenerateTypes;
    List<ContentsProxy>? Types;
    String? Protocol;
    String? ErrorMessage;

    ServicesProxy({this.Name,this.Route,this.UrlName,this.Enabled,this.Access,this.ApiKey,this.AccessControlAllowOrigin,this.AutogenerateTypes,this.Types,this.Protocol,this.ErrorMessage});
    ServicesProxy.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        Route = json['Route'];
        UrlName = json['UrlName'];
        Enabled = json['Enabled'];
        Access = json['Access'];
        ApiKey = json['ApiKey'];
        AccessControlAllowOrigin = json['AccessControlAllowOrigin'];
        AutogenerateTypes = json['AutogenerateTypes'];
        Types = JsonConverters.fromJson(json['Types'],'List<ContentsProxy>',context!);
        Protocol = json['Protocol'];
        ErrorMessage = json['ErrorMessage'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'Route': Route,
        'UrlName': UrlName,
        'Enabled': Enabled,
        'Access': Access,
        'ApiKey': ApiKey,
        'AccessControlAllowOrigin': AccessControlAllowOrigin,
        'AutogenerateTypes': AutogenerateTypes,
        'Types': JsonConverters.toJson(Types,'List<ContentsProxy>',context!),
        'Protocol': Protocol,
        'ErrorMessage': ErrorMessage
    };

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

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

Dart GetService 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.

GET /RestApi/apiservice/services/{Route}/{UrlName} HTTP/1.1 
Host: www.asg.com.au 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Name":"String","Route":"String","UrlName":"String","Enabled":false,"Access":"String","ApiKey":"String","AccessControlAllowOrigin":"String","AutogenerateTypes":false,"Types":null,"Protocol":"String","ErrorMessage":"String"}