| POST | /api/DMS/UploadFile |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports IDB.API.DMS.Operations
Imports IDB.Diagnostics
Imports IDB.Core.Diagnostics.Interfaces
Imports IDB.Core.Diagnostics
Namespace Global
Namespace IDB.API.DMS.Operations
Public Partial Class UploadFile
Public Overridable Property RegistrationProfileID As Guid
Public Overridable Property NavigationPath As String
Public Overridable Property FileName As String
Public Overridable Property FileDate As Date?
Public Overridable Property Description As String
Public Overridable Property DocumentUpload As Boolean
Public Overridable Property Source As String
Public Overridable Property MetaData As String
Public Overridable Property DocumentID As Guid?
Public Overridable Property HoofdDocumentID As Guid?
Public Overridable Property SubDocumentIDs As List(Of Guid)
End Class
<DataContract>
Public Partial Class UploadFileResponse
<DataMember>
Public Overridable Property DocumentId As Guid?
<DataMember>
Public Overridable Property DocumentUploadId As Integer?
<DataMember>
Public Overridable Property DocumentNr As String
<DataMember>
Public Overridable Property Messages As InformationMessages
End Class
End Namespace
Namespace IDB.Core.Diagnostics
Public Enum MessageType
Information = 1
Warning = 2
[Error] = 3
Success = 4
End Enum
End Namespace
Namespace IDB.Core.Diagnostics.Interfaces
Public Partial Class InformationMessageBase
Implements IInformationMessage
Public Overridable Property Type As MessageType Implements IInformationMessage.Type
Public Overridable Property Summary As String Implements IInformationMessage.Summary
Public Overridable Property FullMessage As String Implements IInformationMessage.FullMessage
Public Overridable Property FieldName As String Implements IInformationMessage.FieldName
Public Overridable Property KeepOpen As Boolean Implements IInformationMessage.KeepOpen
End Class
End Namespace
Namespace IDB.Diagnostics
Public Partial Class InformationMessages
Inherits List(Of InformationMessageBase)
Implements IInformationMessages
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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-do-services.klokgroep.nl
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"RegistrationProfileID":"00000000-0000-0000-0000-000000000000","NavigationPath":"String","FileName":"String","FileDate":"0001-01-01T00:00:00.0000000","Description":"String","DocumentUpload":false,"Source":"String","MetaData":"String","DocumentID":"00000000-0000-0000-0000-000000000000","HoofdDocumentID":"00000000-0000-0000-0000-000000000000","SubDocumentIDs":["00000000-0000-0000-0000-000000000000"]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"DocumentId":"00000000-0000-0000-0000-000000000000","DocumentUploadId":0,"DocumentNr":"String","Messages":[{}]}