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
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Add a uploadfile with metadata.
    */
    @Api(Description="Add a uploadfile with metadata.")
    public static class AddUploadFile
    {
        /**
        * Registration profile ID
        */
        @ApiMember(Description="Registration profile ID", IsRequired=true)
        public UUID RegistrationProfileID = null;

        /**
        * Registration navigation path
        */
        @ApiMember(Description="Registration navigation path")
        public String NavigationPath = null;

        /**
        * File name
        */
        @ApiMember(Description="File name", IsRequired=true)
        public String FileName = null;

        /**
        * File date
        */
        @ApiMember(Description="File date", IsRequired=true)
        public Date FileDate = null;

        /**
        * File content
        */
        @ApiMember(Description="File content", IsRequired=true)
        public byte[] FileContent = new byte[]{};

        /**
        * File description
        */
        @ApiMember(Description="File description", IsRequired=true)
        public String Description = null;

        /**
        * Keep document in uploads (false; register immediately)
        */
        @ApiMember(Description="Keep document in uploads (false; register immediately)")
        public Boolean DocumentUpload = null;

        /**
        * Source of the file
        */
        @ApiMember(Description="Source of the file")
        public String Source = null;

        /**
        * MetaDataFields
        */
        @ApiMember(Description="MetaDataFields")
        public ArrayList<MetaDataField> MetaDataFields = null;

        /**
        * Document ID
        */
        @ApiMember(Description="Document ID")
        public UUID DocumentID = null;

        /**
        * Main Document ID
        */
        @ApiMember(Description="Main Document ID")
        public UUID MainDocumentID = null;

        /**
        * Sub Document IDs
        */
        @ApiMember(Description="Sub Document IDs")
        public ArrayList<UUID> SubDocumentIDs = null;
        
        public UUID getRegistrationProfileID() { return RegistrationProfileID; }
        public AddUploadFile setRegistrationProfileID(UUID value) { this.RegistrationProfileID = value; return this; }
        public String getNavigationPath() { return NavigationPath; }
        public AddUploadFile setNavigationPath(String value) { this.NavigationPath = value; return this; }
        public String getFileName() { return FileName; }
        public AddUploadFile setFileName(String value) { this.FileName = value; return this; }
        public Date getFileDate() { return FileDate; }
        public AddUploadFile setFileDate(Date value) { this.FileDate = value; return this; }
        public byte[] getFileContent() { return FileContent; }
        public AddUploadFile setFileContent(byte[] value) { this.FileContent = value; return this; }
        public String getDescription() { return Description; }
        public AddUploadFile setDescription(String value) { this.Description = value; return this; }
        public Boolean isDocumentUpload() { return DocumentUpload; }
        public AddUploadFile setDocumentUpload(Boolean value) { this.DocumentUpload = value; return this; }
        public String getSource() { return Source; }
        public AddUploadFile setSource(String value) { this.Source = value; return this; }
        public ArrayList<MetaDataField> getMetaDataFields() { return MetaDataFields; }
        public AddUploadFile setMetaDataFields(ArrayList<MetaDataField> value) { this.MetaDataFields = value; return this; }
        public UUID getDocumentID() { return DocumentID; }
        public AddUploadFile setDocumentID(UUID value) { this.DocumentID = value; return this; }
        public UUID getMainDocumentID() { return MainDocumentID; }
        public AddUploadFile setMainDocumentID(UUID value) { this.MainDocumentID = value; return this; }
        public ArrayList<UUID> getSubDocumentIDs() { return SubDocumentIDs; }
        public AddUploadFile setSubDocumentIDs(ArrayList<UUID> value) { this.SubDocumentIDs = value; return this; }
    }

    @DataContract
    public static class MetaDataField
    {
        @DataMember
        public UUID ID = null;

        @DataMember
        public UUID DocumentVeldID = null;

        @DataMember
        public String Name = null;

        @DataMember
        public String Label = null;

        @DataMember
        public String Datatype = null;

        @DataMember
        public String PrintLabel = null;

        @DataMember
        public String Entity = null;

        @DataMember
        public String PrintValue = null;

        @DataMember
        public String RegistrationValue = null;

        @DataMember
        public String SPSiteColumnName = null;

        @DataMember
        public String ShadowName = null;

        @DataMember
        public String ShadowDatatype = null;

        @DataMember
        public String ShadowSPSiteColumnName = null;

        @DataMember
        public String ShadowSPSiteColumnRegistrationValue = null;

        @DataMember
        public String ShadowRegistrationValue = null;

        @DataMember
        public Boolean IsKeyField = null;

        @DataMember
        public Boolean KopierenBijNieuweVersie = null;
        
        public UUID getId() { return ID; }
        public MetaDataField setId(UUID value) { this.ID = value; return this; }
        public UUID getDocumentVeldID() { return DocumentVeldID; }
        public MetaDataField setDocumentVeldID(UUID value) { this.DocumentVeldID = value; return this; }
        public String getName() { return Name; }
        public MetaDataField setName(String value) { this.Name = value; return this; }
        public String getLabel() { return Label; }
        public MetaDataField setLabel(String value) { this.Label = value; return this; }
        public String getDatatype() { return Datatype; }
        public MetaDataField setDatatype(String value) { this.Datatype = value; return this; }
        public String getPrintLabel() { return PrintLabel; }
        public MetaDataField setPrintLabel(String value) { this.PrintLabel = value; return this; }
        public String getEntity() { return Entity; }
        public MetaDataField setEntity(String value) { this.Entity = value; return this; }
        public String getPrintValue() { return PrintValue; }
        public MetaDataField setPrintValue(String value) { this.PrintValue = value; return this; }
        public String getRegistrationValue() { return RegistrationValue; }
        public MetaDataField setRegistrationValue(String value) { this.RegistrationValue = value; return this; }
        public String getSpSiteColumnName() { return SPSiteColumnName; }
        public MetaDataField setSpSiteColumnName(String value) { this.SPSiteColumnName = value; return this; }
        public String getShadowName() { return ShadowName; }
        public MetaDataField setShadowName(String value) { this.ShadowName = value; return this; }
        public String getShadowDatatype() { return ShadowDatatype; }
        public MetaDataField setShadowDatatype(String value) { this.ShadowDatatype = value; return this; }
        public String getShadowSPSiteColumnName() { return ShadowSPSiteColumnName; }
        public MetaDataField setShadowSPSiteColumnName(String value) { this.ShadowSPSiteColumnName = value; return this; }
        public String getShadowSPSiteColumnRegistrationValue() { return ShadowSPSiteColumnRegistrationValue; }
        public MetaDataField setShadowSPSiteColumnRegistrationValue(String value) { this.ShadowSPSiteColumnRegistrationValue = value; return this; }
        public String getShadowRegistrationValue() { return ShadowRegistrationValue; }
        public MetaDataField setShadowRegistrationValue(String value) { this.ShadowRegistrationValue = value; return this; }
        public Boolean getIsKeyField() { return IsKeyField; }
        public MetaDataField setIsKeyField(Boolean value) { this.IsKeyField = value; return this; }
        public Boolean isKopierenBijNieuweVersie() { return KopierenBijNieuweVersie; }
        public MetaDataField setKopierenBijNieuweVersie(Boolean value) { this.KopierenBijNieuweVersie = value; return this; }
    }

    @DataContract
    public static class AddUploadFileResponse
    {
        @DataMember
        public UUID DocumentId = null;

        @DataMember
        public Integer DocumentUploadId = null;

        @DataMember
        public String DocumentNr = null;

        @DataMember
        public InformationMessages Messages = null;
        
        public UUID getDocumentId() { return DocumentId; }
        public AddUploadFileResponse setDocumentId(UUID value) { this.DocumentId = value; return this; }
        public Integer getDocumentUploadId() { return DocumentUploadId; }
        public AddUploadFileResponse setDocumentUploadId(Integer value) { this.DocumentUploadId = value; return this; }
        public String getDocumentNr() { return DocumentNr; }
        public AddUploadFileResponse setDocumentNr(String value) { this.DocumentNr = value; return this; }
        public InformationMessages getMessages() { return Messages; }
        public AddUploadFileResponse setMessages(InformationMessages value) { this.Messages = value; return this; }
    }

    public static class InformationMessages extends ArrayList<InformationMessageBase> implements IInformationMessages
    {
        
    }

    public static class InformationMessageBase implements IInformationMessage
    {
        public MessageType Type = null;
        public String Summary = null;
        public String FullMessage = null;
        public String FieldName = null;
        public Boolean KeepOpen = null;
        
        public MessageType getType() { return Type; }
        public InformationMessageBase setType(MessageType value) { this.Type = value; return this; }
        public String getSummary() { return Summary; }
        public InformationMessageBase setSummary(String value) { this.Summary = value; return this; }
        public String getFullMessage() { return FullMessage; }
        public InformationMessageBase setFullMessage(String value) { this.FullMessage = value; return this; }
        public String getFieldName() { return FieldName; }
        public InformationMessageBase setFieldName(String value) { this.FieldName = value; return this; }
        public Boolean isKeepOpen() { return KeepOpen; }
        public InformationMessageBase setKeepOpen(Boolean value) { this.KeepOpen = value; return this; }
    }

    public static enum MessageType
    {
        Information(1),
        Warning(2),
        Error(3),
        Success(4);

        private final int value;
        MessageType(final int intValue) { value = intValue; }
        public int getValue() { return value; }
    }

}

Java 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: 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>