Lantronix EDS3000PS Command Reference - Page 47

Configuration Using Web API, EDS3000 Command Reference

Page 47 highlights

5: Configuration Using Web API query_port 0 tunnel 0 user_data 0 HTTP PUT Used to place new files in the file system and update existing files. Directories cannot be created using PUT; the MKCOL request must be used. Note that PUT will overwrite an existing file by the same name. URL: http:///fs/[path]/file HTTP Response Codes: 201: File successfully created. This code is part of the WebDAV standard. 509: Not enough space 500: Other failure Example: # ls -l -rw-r--r-- 1 user wheel 166 Oct 22 2013 file.txt # curl -s -u admin:PASSWORD http://192.168.0.1/fs/ -T file.txt # curl -s -u admin:PASSWORD http://192.168.0.1/fs/ ]> file.txt 166 HTTP MKCOL Used to create new directories (not files) in the file system. MKCOL ?is an HTTP extension from the WebDAV standard. URL: http:///fs/[path]/directory HTTP Response Codes: EDS3000 Command Reference 47

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83

5: Configuration Using Web API
EDS3000 Command Reference
47
</dentry>
<dentry type = directory>
<name>query_port</name>
<size>0</size>
</dentry>
<dentry type = directory>
<name>tunnel</name>
<size>0</size>
</dentry>
<dentry type = directory>
<name>user_data</name>
<size>0</size>
</dentry>
</directorylist>
HTTP PUT
Used to place new files in the file system and update existing files. Directories cannot be created
using PUT; the MKCOL request must be used.
Note that PUT will overwrite an existing file by the same name.
URL:
http://<hostname>/fs/[path]/file
HTTP Response Codes:
201: File successfully created. This code is part of the WebDAV standard.
509: Not enough space
500: Other failure
Example:
# ls -l
-rw-r--r-- 1 user wheel 166 Oct 22 2013 file.txt
# curl -s -u admin:PASSWORD http://192.168.0.1/fs/ -T file.txt
# curl -s -u admin:PASSWORD http://192.168.0.1/fs/
<!-- Automatically generated XML -->
<!DOCTYPE directorylist [
<!ELEMENT dentry (name,size)>
<!ELEMENT name (#CDATA)>
<!ELEMENT size (#CDATA)>
<!ATTLIST dentry type CDATA #IMPLIED>
<!ATTLIST directorylist path CDATA #IMPLIED>
]>
<directorylist path = "/embedded">
<dentry type = file>
<name>file.txt</name>
<size>166</size>
</dentry>
</directorylist>
HTTP MKCOL
Used to create new directories (not files) in the file system. MKCOL ?is an HTTP extension from
the WebDAV standard.
URL:
http://<hostname>/fs/[path]/directory
HTTP Response Codes: