| Requires any of the roles: | Client, Admin, Partner |
| 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; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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: text/csv
Content-Type: text/csv
Content-Length: length
{"Path":"String","TextContents":"String","ForDownload":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Directory":{"Folders":[{"Name":"String","ModifiedDate":"0001-01-01T00:00:00.0000000","FileCount":0}],"Files":[{"Name":"String","Extension":"String","FileSizeBytes":0,"ModifiedDate":"0001-01-01T00:00:00.0000000","IsTextFile":false}]},"File":{"Name":"String","Extension":"String","FileSizeBytes":0,"ModifiedDate":"0001-01-01T00:00:00.0000000","IsTextFile":false,"Contents":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}