| Requires any of the roles: | Client, Admin, Partner |
| All Verbs | /restfiles/files | ||
|---|---|---|---|
| All Verbs | /restfiles/files/{Path*} |
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using digitaluapi.ServiceInterface;
namespace digitaluapi.ServiceInterface
{
public partial class File
{
public virtual string Name { get; set; }
public virtual string Extension { get; set; }
public virtual long FileSizeBytes { get; set; }
public virtual DateTime ModifiedDate { get; set; }
public virtual bool IsTextFile { get; set; }
}
public partial class FileResult
{
public virtual string Name { get; set; }
public virtual string Extension { get; set; }
public virtual long FileSizeBytes { get; set; }
public virtual DateTime ModifiedDate { get; set; }
public virtual bool IsTextFile { get; set; }
public virtual string Contents { get; set; }
}
public partial class Files
{
public virtual string Path { get; set; }
public virtual string TextContents { get; set; }
public virtual bool ForDownload { get; set; }
}
public partial class FilesResponse
{
public virtual FolderResult Directory { get; set; }
public virtual FileResult File { get; set; }
public virtual ResponseStatus ResponseStatus { get; set; }
}
public partial class Folder
{
public virtual string Name { get; set; }
public virtual DateTime ModifiedDate { get; set; }
public virtual int FileCount { get; set; }
}
public partial class FolderResult
{
public virtual List<Folder> Folders { get; set; }
public virtual List<File> Files { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
Content-Type: text/jsv
Content-Length: length
{
Path: String,
TextContents: String,
ForDownload: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Directory:
{
Folders:
[
{
Name: String,
ModifiedDate: 0001-01-01,
FileCount: 0
}
],
Files:
[
{
Name: String,
Extension: String,
FileSizeBytes: 0,
ModifiedDate: 0001-01-01,
IsTextFile: False
}
]
},
File:
{
Name: String,
Extension: String,
FileSizeBytes: 0,
ModifiedDate: 0001-01-01,
IsTextFile: False,
Contents: String
},
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}