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()),
});
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.
GET /RestApi/apiservice/services/{Route}/{UrlName} HTTP/1.1 Host: www.asg.com.au Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ServicesProxy xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Telerik.Sitefinity.Web.Api.Web.Services.Dto.Responses"> <Access>String</Access> <AccessControlAllowOrigin>String</AccessControlAllowOrigin> <ApiKey>String</ApiKey> <AutogenerateTypes>false</AutogenerateTypes> <Enabled>false</Enabled> <ErrorMessage>String</ErrorMessage> <Name>String</Name> <Protocol>String</Protocol> <Route>String</Route> <Types i:nil="true" /> <UrlName>String</UrlName> </ServicesProxy>