| POST | /api/DMS/UploadFile |
|---|
namespace IDB.API.DMS.Operations
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type UploadFile() =
member val RegistrationProfileID:Guid = new Guid() with get,set
member val NavigationPath:String = null with get,set
member val FileName:String = null with get,set
member val FileDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val Description:String = null with get,set
member val DocumentUpload:Boolean = new Boolean() with get,set
member val Source:String = null with get,set
member val MetaData:String = null with get,set
member val DocumentID:Nullable<Guid> = new Nullable<Guid>() with get,set
member val HoofdDocumentID:Nullable<Guid> = new Nullable<Guid>() with get,set
member val SubDocumentIDs:ResizeArray<Guid> = null with get,set
type MessageType =
| Information = 1
| Warning = 2
| Error = 3
| Success = 4
[<AllowNullLiteral>]
type InformationMessageBase() =
member val Type:MessageType = new MessageType() with get,set
member val Summary:String = null with get,set
member val FullMessage:String = null with get,set
member val FieldName:String = null with get,set
member val KeepOpen:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type InformationMessages() =
inherit ResizeArray<InformationMessageBase>()
[<DataContract>]
[<AllowNullLiteral>]
type UploadFileResponse() =
[<DataMember>]
member val DocumentId:Nullable<Guid> = new Nullable<Guid>() with get,set
[<DataMember>]
member val DocumentUploadId:Nullable<Int32> = new Nullable<Int32>() with get,set
[<DataMember>]
member val DocumentNr:String = null with get,set
[<DataMember>]
member val Messages:InformationMessages = null with get,set
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.
POST /api/DMS/UploadFile HTTP/1.1
Host: test-dogw.klokgroep.nl
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<UploadFile xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DMS.Operations">
<Description>String</Description>
<DocumentID>00000000-0000-0000-0000-000000000000</DocumentID>
<DocumentUpload>false</DocumentUpload>
<FileDate>0001-01-01T00:00:00</FileDate>
<FileName>String</FileName>
<HoofdDocumentID>00000000-0000-0000-0000-000000000000</HoofdDocumentID>
<MetaData>String</MetaData>
<NavigationPath>String</NavigationPath>
<RegistrationProfileID>00000000-0000-0000-0000-000000000000</RegistrationProfileID>
<Source>String</Source>
<SubDocumentIDs xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</SubDocumentIDs>
</UploadFile>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<UploadFileResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DMS.Operations">
<DocumentId>00000000-0000-0000-0000-000000000000</DocumentId>
<DocumentNr>String</DocumentNr>
<DocumentUploadId>0</DocumentUploadId>
<Messages xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.Core.Diagnostics.Interfaces">
<d2p1:InformationMessageBase i:nil="true" />
</Messages>
</UploadFileResponse>