Create a File
This operation allows you to create a new named file in the servers storage folder. If the file already exists the operation will fail.
HTTP method |
POST
|
URI |
/FileService/filename.ext
|
Request headers |
Host: <server_dns_or_ip> Accept: <mime_type> Content-Length: <int> Content-Type: text/plain Content-Length: <length>
|
Request body |
A string containing the records from the text file.
|
Response headers |
Content-Length: <int> Date: <date_time> Server: Microsoft-HTTPAPI/2.0
|
Response body |
A JSON or XML string containing the full file spec of the file on the server.
|
HTTP result codes |
HTTP 200 (OK) indicates that the file was created. HTTP 403 (forbidden) indicates that the file already existed and was NOT updated.
|
Response Data Format
The format of the returned data is determined by the value of the HTTP Accept header that you pass.
Response Format |
MIME Type |
JSON string |
application/json |
XML string |
application/xml |
If you do not pass an Accept header then the default response will be a JSON array.