| Requires any of the roles: | Client, Admin, Partner |
| All Verbs | /restfiles/files | ||
|---|---|---|---|
| All Verbs | /restfiles/files/{Path*} |
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports digitaluapi.ServiceInterface
Namespace Global
Namespace digitaluapi.ServiceInterface
Public Partial Class File
Public Overridable Property Name As String
Public Overridable Property Extension As String
Public Overridable Property FileSizeBytes As Long
Public Overridable Property ModifiedDate As Date
Public Overridable Property IsTextFile As Boolean
End Class
Public Partial Class FileResult
Public Overridable Property Name As String
Public Overridable Property Extension As String
Public Overridable Property FileSizeBytes As Long
Public Overridable Property ModifiedDate As Date
Public Overridable Property IsTextFile As Boolean
Public Overridable Property Contents As String
End Class
Public Partial Class Files
Public Overridable Property Path As String
Public Overridable Property TextContents As String
Public Overridable Property ForDownload As Boolean
End Class
Public Partial Class FilesResponse
Public Overridable Property Directory As FolderResult
Public Overridable Property File As FileResult
Public Overridable Property ResponseStatus As ResponseStatus
End Class
Public Partial Class Folder
Public Overridable Property Name As String
Public Overridable Property ModifiedDate As Date
Public Overridable Property FileCount As Integer
End Class
Public Partial Class FolderResult
Public Overridable Property Folders As List(Of Folder)
Public Overridable Property Files As List(Of File)
End Class
End Namespace
End Namespace
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
}
}
}