digitaluapi

<back to all web services

Files

Requires Authentication
Requires any of the roles:Client, Admin, Partner
The following routes are available for this service:
All Verbs/restfiles/files
All Verbs/restfiles/files/{Path*}
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class Files
    {
        public String Path = null;
        public String TextContents = null;
        public Boolean ForDownload = null;
        
        public String getPath() { return Path; }
        public Files setPath(String value) { this.Path = value; return this; }
        public String getTextContents() { return TextContents; }
        public Files setTextContents(String value) { this.TextContents = value; return this; }
        public Boolean isForDownload() { return ForDownload; }
        public Files setForDownload(Boolean value) { this.ForDownload = value; return this; }
    }

    public static class FilesResponse
    {
        public FolderResult Directory = null;
        public FileResult File = null;
        public ResponseStatus ResponseStatus = null;
        
        public FolderResult getDirectory() { return Directory; }
        public FilesResponse setDirectory(FolderResult value) { this.Directory = value; return this; }
        public FileResult getFile() { return File; }
        public FilesResponse setFile(FileResult value) { this.File = value; return this; }
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public FilesResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
    }

    public static class FolderResult
    {
        public ArrayList<Folder> Folders = null;
        public ArrayList<File> Files = null;
        
        public ArrayList<Folder> getFolders() { return Folders; }
        public FolderResult setFolders(ArrayList<Folder> value) { this.Folders = value; return this; }
        public ArrayList<File> getFiles() { return Files; }
        public FolderResult setFiles(ArrayList<File> value) { this.Files = value; return this; }
    }

    public static class Folder
    {
        public String Name = null;
        public Date ModifiedDate = null;
        public Integer FileCount = null;
        
        public String getName() { return Name; }
        public Folder setName(String value) { this.Name = value; return this; }
        public Date getModifiedDate() { return ModifiedDate; }
        public Folder setModifiedDate(Date value) { this.ModifiedDate = value; return this; }
        public Integer getFileCount() { return FileCount; }
        public Folder setFileCount(Integer value) { this.FileCount = value; return this; }
    }

    public static class File
    {
        public String Name = null;
        public String Extension = null;
        public Long FileSizeBytes = null;
        public Date ModifiedDate = null;
        public Boolean IsTextFile = null;
        
        public String getName() { return Name; }
        public File setName(String value) { this.Name = value; return this; }
        public String getExtension() { return Extension; }
        public File setExtension(String value) { this.Extension = value; return this; }
        public Long getFileSizeBytes() { return FileSizeBytes; }
        public File setFileSizeBytes(Long value) { this.FileSizeBytes = value; return this; }
        public Date getModifiedDate() { return ModifiedDate; }
        public File setModifiedDate(Date value) { this.ModifiedDate = value; return this; }
        public Boolean getIsTextFile() { return IsTextFile; }
        public File setIsTextFile(Boolean value) { this.IsTextFile = value; return this; }
    }

    public static class FileResult
    {
        public String Name = null;
        public String Extension = null;
        public Long FileSizeBytes = null;
        public Date ModifiedDate = null;
        public Boolean IsTextFile = null;
        public String Contents = null;
        
        public String getName() { return Name; }
        public FileResult setName(String value) { this.Name = value; return this; }
        public String getExtension() { return Extension; }
        public FileResult setExtension(String value) { this.Extension = value; return this; }
        public Long getFileSizeBytes() { return FileSizeBytes; }
        public FileResult setFileSizeBytes(Long value) { this.FileSizeBytes = value; return this; }
        public Date getModifiedDate() { return ModifiedDate; }
        public FileResult setModifiedDate(Date value) { this.ModifiedDate = value; return this; }
        public Boolean getIsTextFile() { return IsTextFile; }
        public FileResult setIsTextFile(Boolean value) { this.IsTextFile = value; return this; }
        public String getContents() { return Contents; }
        public FileResult setContents(String value) { this.Contents = value; return this; }
    }

}

Java Files 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 /restfiles/files HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<Files xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceInterface">
  <ForDownload>false</ForDownload>
  <Path>String</Path>
  <TextContents>String</TextContents>
</Files>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<FilesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceInterface">
  <Directory>
    <Files>
      <File>
        <Extension>String</Extension>
        <FileSizeBytes>0</FileSizeBytes>
        <IsTextFile>false</IsTextFile>
        <ModifiedDate>0001-01-01T00:00:00</ModifiedDate>
        <Name>String</Name>
      </File>
    </Files>
    <Folders>
      <Folder>
        <FileCount>0</FileCount>
        <ModifiedDate>0001-01-01T00:00:00</ModifiedDate>
        <Name>String</Name>
      </Folder>
    </Folders>
  </Directory>
  <File>
    <Contents>String</Contents>
    <Extension>String</Extension>
    <FileSizeBytes>0</FileSizeBytes>
    <IsTextFile>false</IsTextFile>
    <ModifiedDate>0001-01-01T00:00:00</ModifiedDate>
    <Name>String</Name>
  </File>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</FilesResponse>