DigiOffice Gateway Web Services

<back to all web services

UploadFile

Requires Authentication
The following routes are available for this service:
POST/api/DMS/UploadFile
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class UploadFile
    {
        public UUID RegistrationProfileID = null;
        public String NavigationPath = null;
        public String FileName = null;
        public String Description = null;
        public Boolean DocumentUpload = null;
        public ArrayList<MetaDataField> MetaData = null;
        public UUID DocumentID = null;
        public UUID HoofdDocumentID = null;
        public ArrayList<UUID> SubDocumentIDs = null;
        
        public UUID getRegistrationProfileID() { return RegistrationProfileID; }
        public UploadFile setRegistrationProfileID(UUID value) { this.RegistrationProfileID = value; return this; }
        public String getNavigationPath() { return NavigationPath; }
        public UploadFile setNavigationPath(String value) { this.NavigationPath = value; return this; }
        public String getFileName() { return FileName; }
        public UploadFile setFileName(String value) { this.FileName = value; return this; }
        public String getDescription() { return Description; }
        public UploadFile setDescription(String value) { this.Description = value; return this; }
        public Boolean isDocumentUpload() { return DocumentUpload; }
        public UploadFile setDocumentUpload(Boolean value) { this.DocumentUpload = value; return this; }
        public ArrayList<MetaDataField> getMetaData() { return MetaData; }
        public UploadFile setMetaData(ArrayList<MetaDataField> value) { this.MetaData = value; return this; }
        public UUID getDocumentID() { return DocumentID; }
        public UploadFile setDocumentID(UUID value) { this.DocumentID = value; return this; }
        public UUID getHoofdDocumentID() { return HoofdDocumentID; }
        public UploadFile setHoofdDocumentID(UUID value) { this.HoofdDocumentID = value; return this; }
        public ArrayList<UUID> getSubDocumentIDs() { return SubDocumentIDs; }
        public UploadFile 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 UploadFileResponse
    {
        @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 UploadFileResponse setDocumentId(UUID value) { this.DocumentId = value; return this; }
        public Integer getDocumentUploadId() { return DocumentUploadId; }
        public UploadFileResponse setDocumentUploadId(Integer value) { this.DocumentUploadId = value; return this; }
        public String getDocumentNr() { return DocumentNr; }
        public UploadFileResponse setDocumentNr(String value) { this.DocumentNr = value; return this; }
        public InformationMessages getMessages() { return Messages; }
        public UploadFileResponse 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 UploadFile 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/UploadFile HTTP/1.1 
Host: digiofficeapigateway.deltares.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>
  <FileName>String</FileName>
  <HoofdDocumentID>00000000-0000-0000-0000-000000000000</HoofdDocumentID>
  <MetaData 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>
  </MetaData>
  <NavigationPath>String</NavigationPath>
  <RegistrationProfileID>00000000-0000-0000-0000-000000000000</RegistrationProfileID>
  <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>