DigiOffice API Services 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 java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class UploadFile
    {
        public UUID RegistrationProfileID = null;
        public String NavigationPath = null;
        public String FileName = null;
        public Date FileDate = null;
        public String Description = null;
        public Boolean DocumentUpload = null;
        public String Source = null;
        public String 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 Date getFileDate() { return FileDate; }
        public UploadFile setFileDate(Date value) { this.FileDate = 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 String getSource() { return Source; }
        public UploadFile setSource(String value) { this.Source = value; return this; }
        public String getMetaData() { return MetaData; }
        public UploadFile setMetaData(String 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 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 .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
Content-Type: application/json
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: application/json
Content-Length: length

{"DocumentId":"00000000-0000-0000-0000-000000000000","DocumentUploadId":0,"DocumentNr":"String","Messages":[{}]}