| POST | /api/DMS/UploadFile |
|---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using IDB.API.DMS.Operations;
using IDB.Diagnostics;
using IDB.Core.Diagnostics.Interfaces;
using IDB.Core.Diagnostics;
namespace IDB.API.DMS.Operations
{
public partial class UploadFile
{
public virtual Guid RegistrationProfileID { get; set; }
public virtual string NavigationPath { get; set; }
public virtual string FileName { get; set; }
public virtual DateTime? FileDate { get; set; }
public virtual string Description { get; set; }
public virtual bool DocumentUpload { get; set; }
public virtual string Source { get; set; }
public virtual string MetaData { get; set; }
public virtual Guid? DocumentID { get; set; }
public virtual Guid? HoofdDocumentID { get; set; }
public virtual List<Guid> SubDocumentIDs { get; set; }
}
[DataContract]
public partial class UploadFileResponse
{
[DataMember]
public virtual Guid? DocumentId { get; set; }
[DataMember]
public virtual int? DocumentUploadId { get; set; }
[DataMember]
public virtual string DocumentNr { get; set; }
[DataMember]
public virtual InformationMessages Messages { get; set; }
}
}
namespace IDB.Core.Diagnostics
{
public enum MessageType
{
Information = 1,
Warning = 2,
Error = 3,
Success = 4,
}
}
namespace IDB.Core.Diagnostics.Interfaces
{
public partial class InformationMessageBase
: IInformationMessage
{
public virtual MessageType Type { get; set; }
public virtual string Summary { get; set; }
public virtual string FullMessage { get; set; }
public virtual string FieldName { get; set; }
public virtual bool KeepOpen { get; set; }
}
}
namespace IDB.Diagnostics
{
public partial class InformationMessages
: List<InformationMessageBase>, IInformationMessages
{
}
}
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: 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>