AWS Examples

<back to all web services

Files

The following routes are available for this service:
All Verbs/restfiles/files
All Verbs/restfiles/files/{Path*}
Files Parameters:
NameParameterData TypeRequiredDescription
PathpathstringNo
TextContentsquerystringNo
ForDownloadqueryboolNo
FilesResponse Parameters:
NameParameterData TypeRequiredDescription
DirectoryformFolderResultNo
FileformFileResultNo
ResponseStatusformResponseStatusNo
FolderResult Parameters:
NameParameterData TypeRequiredDescription
FoldersformList<Folder>No
FilesformList<File>No
Folder Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo
ModifiedDateformDateTimeNo
FileCountformintNo
File Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo
ExtensionformstringNo
FileSizeBytesformlongNo
ModifiedDateformDateTimeNo
IsTextFileformboolNo
FileResult Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo
ExtensionformstringNo
FileSizeBytesformlongNo
ModifiedDateformDateTimeNo
IsTextFileformboolNo
ContentsformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /csv/reply/Files HTTP/1.1 
Host: awsapps.servicestack.net 
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":"\/Date(-62135596800000-0000)\/","fileCount":0}],"files":[{"name":"String","extension":"String","fileSizeBytes":0,"modifiedDate":"\/Date(-62135596800000-0000)\/","isTextFile":false}]},"file":{"name":"String","extension":"String","fileSizeBytes":0,"modifiedDate":"\/Date(-62135596800000-0000)\/","isTextFile":false,"contents":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}