DigiOffice Gateway Web Services

<back to all web services

AddUploadFile

Add a uploadfile with metadata.

Requires Authentication
The following routes are available for this service:
POST/api/DMS/AddUploadFile
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports IDB.API.DTO.Document.Operations
Imports IDB.API.DMS
Imports IDB.Diagnostics
Imports IDB.Core.Diagnostics.Interfaces
Imports IDB.Core.Diagnostics

Namespace Global

    Namespace IDB.API.DMS

        <DataContract>
        Public Partial Class MetaDataField
            <DataMember>
            Public Overridable Property ID As Guid?

            <DataMember>
            Public Overridable Property DocumentVeldID As Guid?

            <DataMember>
            Public Overridable Property Name As String

            <DataMember>
            Public Overridable Property Label As String

            <DataMember>
            Public Overridable Property Datatype As String

            <DataMember>
            Public Overridable Property PrintLabel As String

            <DataMember>
            Public Overridable Property Entity As String

            <DataMember>
            Public Overridable Property PrintValue As String

            <DataMember>
            Public Overridable Property RegistrationValue As String

            <DataMember>
            Public Overridable Property SPSiteColumnName As String

            <DataMember>
            Public Overridable Property ShadowName As String

            <DataMember>
            Public Overridable Property ShadowDatatype As String

            <DataMember>
            Public Overridable Property ShadowSPSiteColumnName As String

            <DataMember>
            Public Overridable Property ShadowSPSiteColumnRegistrationValue As String

            <DataMember>
            Public Overridable Property ShadowRegistrationValue As String

            <DataMember>
            Public Overridable Property IsKeyField As Boolean

            <DataMember>
            Public Overridable Property KopierenBijNieuweVersie As Boolean
        End Class
    End Namespace

    Namespace IDB.API.DTO.Document.Operations

        '''<Summary>
        '''Add a uploadfile with metadata.
        '''</Summary>
        <Api(Description:="Add a uploadfile with metadata.")>
        Public Partial Class AddUploadFile
            '''<Summary>
            '''Registration profile ID
            '''</Summary>
            <ApiMember(Description:="Registration profile ID", IsRequired:=true)>
            Public Overridable Property RegistrationProfileID As Guid

            '''<Summary>
            '''Registration navigation path
            '''</Summary>
            <ApiMember(Description:="Registration navigation path")>
            Public Overridable Property NavigationPath As String

            '''<Summary>
            '''File name
            '''</Summary>
            <ApiMember(Description:="File name", IsRequired:=true)>
            Public Overridable Property FileName As String

            '''<Summary>
            '''File date
            '''</Summary>
            <ApiMember(Description:="File date", IsRequired:=true)>
            Public Overridable Property FileDate As Date

            '''<Summary>
            '''File content
            '''</Summary>
            <ApiMember(Description:="File content", IsRequired:=true)>
            Public Overridable Property FileContent As Byte() = New Byte(){}

            '''<Summary>
            '''File description
            '''</Summary>
            <ApiMember(Description:="File description", IsRequired:=true)>
            Public Overridable Property Description As String

            '''<Summary>
            '''Keep document in uploads (false; register immediately)
            '''</Summary>
            <ApiMember(Description:="Keep document in uploads (false; register immediately)")>
            Public Overridable Property DocumentUpload As Boolean

            '''<Summary>
            '''Source of the file
            '''</Summary>
            <ApiMember(Description:="Source of the file")>
            Public Overridable Property Source As String

            '''<Summary>
            '''MetaDataFields
            '''</Summary>
            <ApiMember(Description:="MetaDataFields")>
            Public Overridable Property MetaDataFields As List(Of MetaDataField)

            '''<Summary>
            '''Document ID
            '''</Summary>
            <ApiMember(Description:="Document ID")>
            Public Overridable Property DocumentID As Guid?

            '''<Summary>
            '''Main Document ID
            '''</Summary>
            <ApiMember(Description:="Main Document ID")>
            Public Overridable Property MainDocumentID As Guid?

            '''<Summary>
            '''Sub Document IDs
            '''</Summary>
            <ApiMember(Description:="Sub Document IDs")>
            Public Overridable Property SubDocumentIDs As List(Of Guid)
        End Class

        <DataContract>
        Public Partial Class AddUploadFileResponse
            <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

VB.NET AddUploadFile DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/DMS/AddUploadFile HTTP/1.1 
Host: test-dogw.klokgroep.nl 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<AddUploadFile xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Document.Operations">
  <Description>String</Description>
  <DocumentID>00000000-0000-0000-0000-000000000000</DocumentID>
  <DocumentUpload>false</DocumentUpload>
  <FileContent>AA==</FileContent>
  <FileDate>0001-01-01T00:00:00</FileDate>
  <FileName>String</FileName>
  <MainDocumentID>00000000-0000-0000-0000-000000000000</MainDocumentID>
  <MetaDataFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.API.DMS">
    <d2p1:MetaDataField>
      <d2p1:Datatype>String</d2p1:Datatype>
      <d2p1:DocumentVeldID>00000000-0000-0000-0000-000000000000</d2p1:DocumentVeldID>
      <d2p1:Entity>String</d2p1:Entity>
      <d2p1:ID>00000000-0000-0000-0000-000000000000</d2p1:ID>
      <d2p1:IsKeyField>false</d2p1:IsKeyField>
      <d2p1:KopierenBijNieuweVersie>false</d2p1:KopierenBijNieuweVersie>
      <d2p1:Label>String</d2p1:Label>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:PrintLabel>String</d2p1:PrintLabel>
      <d2p1:PrintValue>String</d2p1:PrintValue>
      <d2p1:RegistrationValue>String</d2p1:RegistrationValue>
      <d2p1:SPSiteColumnName>String</d2p1:SPSiteColumnName>
      <d2p1:ShadowDatatype>String</d2p1:ShadowDatatype>
      <d2p1:ShadowName>String</d2p1:ShadowName>
      <d2p1:ShadowRegistrationValue>String</d2p1:ShadowRegistrationValue>
      <d2p1:ShadowSPSiteColumnName>String</d2p1:ShadowSPSiteColumnName>
      <d2p1:ShadowSPSiteColumnRegistrationValue>String</d2p1:ShadowSPSiteColumnRegistrationValue>
    </d2p1:MetaDataField>
  </MetaDataFields>
  <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>
</AddUploadFile>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AddUploadFileResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Document.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>
</AddUploadFileResponse>