GET | /api/documents/{DocumentID}/filedetails |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class DocumentFile implements IConvertible
{
String? Name;
String? Extension;
int? Size;
Uint8List? Content;
DocumentFile({this.Name,this.Extension,this.Size,this.Content});
DocumentFile.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
Extension = json['Extension'];
Size = json['Size'];
Content = JsonConverters.fromJson(json['Content'],'Uint8List',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'Extension': Extension,
'Size': Size,
'Content': JsonConverters.toJson(Content,'Uint8List',context!)
};
getTypeName() => "DocumentFile";
TypeContext? context = _ctx;
}
class GetDocumentFileDetails implements IConvertible
{
String? DocumentID;
bool? IncludeContent;
String? DocumentFieldID;
GetDocumentFileDetails({this.DocumentID,this.IncludeContent,this.DocumentFieldID});
GetDocumentFileDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DocumentID = json['DocumentID'];
IncludeContent = json['IncludeContent'];
DocumentFieldID = json['DocumentFieldID'];
return this;
}
Map<String, dynamic> toJson() => {
'DocumentID': DocumentID,
'IncludeContent': IncludeContent,
'DocumentFieldID': DocumentFieldID
};
getTypeName() => "GetDocumentFileDetails";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'digiofficeapigateway.deltares.nl', types: <String, TypeInfo> {
'DocumentFile': TypeInfo(TypeOf.Class, create:() => DocumentFile()),
'Uint8List': TypeInfo(TypeOf.Class, create:() => Uint8List(0)),
'GetDocumentFileDetails': TypeInfo(TypeOf.Class, create:() => GetDocumentFileDetails()),
});
Dart GetDocumentFileDetails DTOs
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 /api/documents/{DocumentID}/filedetails HTTP/1.1 Host: digiofficeapigateway.deltares.nl Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <DocumentFile xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Document"> <Content>AA==</Content> <Extension>String</Extension> <Name>String</Name> <Size>0</Size> </DocumentFile>