Lantronix SGX 5150 IoT Device Gateway SGX 5150 Command Reference - Page 64
HTTP GET, Node not found
View all Lantronix SGX 5150 IoT Device Gateway manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 64 highlights
5: Configuration Using Web API HTTP GET Used to read the contents of files and directories in the file system. URL: http:///fs/[node] Where node can be a file, in which case the file content is returned, or a directory, in which case an XML-formatted list of directory objects is returned. HTTP Response Codes: 200: Success 404: Node not found Example: # curl -s -u admin:PASSWORD http://192.168.0.1/fs/embedded ]> main 0 modem_emulation 0 monitor 0 ntp 0 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. SGX 5150 IoT Device Gateway Command Reference 64
5: Configuration Using Web API
SGX 5150 IoT Device Gateway Command Reference
64
HTTP GET
Used to read the contents of files and directories in the file system.
URL:
http://<hostname>/fs/[node]
Where node can be a file, in which case the file content is returned, or a directory, in which case
an XML-formatted list of directory objects is returned.
HTTP Response Codes:
200: Success
404: Node not found
Example:
# curl -s -u admin:PASSWORD http://192.168.0.1/fs/embedded
<!-- 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 = directory>
<name>main</name>
<size>0</size>
</dentry>
<dentry type = directory>
<name>modem_emulation</name>
<size>0</size>
</dentry>
<dentry type = directory>
<name>monitor</name>
<size>0</size>
</dentry>
<dentry type = directory>
<name>ntp</name>
<size>0</size>
</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.