Lantronix EDS3000PS Command Reference - Page 43

Take Status Action

Page 43 highlights

5: Configuration Using Web API CURL example (configuration is saved in a local file config.xml): curl -u admin:PASSWORD http:///import/config -X POST --form [email protected] CURL example (configuration as part of command): curl -u admin:PASSWORD http:///import/config -X POST --form-string 'configrecord= ]> disable ' HTTP example: Take Status Action An HTTP POST request can be sent to take a status action.  Protocol: HTTP  Method: POST  URL: http:///action/status Parameters:  group: Required. The status group where action is defined.  optionalGroupInstance: Optional instance of status group.  optionalItem: Optional item of status group where action is defined.  optionalItemInstance: Optional instance of status item.  action: Required. The action to be taken. EDS3000 Command Reference 43

  • 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
43
CURL example (configuration is saved in a local file config.xml):
curl -u admin:PASSWORD http://<ip-address>/import/config -X POST --form
CURL example (configuration as part of command):
curl -u admin:PASSWORD http://<ip-address>/import/config -X POST --form-string
'configrecord=<?xml version="1.0" standalone="yes"?>
<!-- Automatically generated XML -->
<!DOCTYPE configrecord [
<!ELEMENT configrecord (configgroup+)>
<!ELEMENT configgroup (configitem+)>
<!ELEMENT configitem (value+)>
<!ELEMENT value (#PCDATA)>
<!ATTLIST configrecord version CDATA #IMPLIED>
<!ATTLIST configgroup name CDATA #IMPLIED>
<!ATTLIST configgroup instance CDATA #IMPLIED>
<!ATTLIST configitem name CDATA #IMPLIED>
<!ATTLIST configitem instance CDATA #IMPLIED>
<!ATTLIST value name CDATA #IMPLIED>
]>
<configrecord version = "0.1.0.1">
<configgroup name = "ftp server">
<configitem name = "state">
<value>disable</value>
</configitem>
</configgroup>
</configrecord>'
HTTP example:
<form method="post" enctype="multipart/form-data" action="/import/config"
target="_blank">
<input name="configrecord" type="file" size="32">
<input name="submit" type="submit" value="Import Configuration">
</form>
Take Status Action
An HTTP POST request can be sent to take a status action.
Protocol: HTTP
Method: POST
URL: http://<hostname>/action/status
Parameters:
group: Required. The status group where action is defined.
optionalGroupInstance: Optional instance of status group.
optionalItem: Optional item of status group where action is defined.
optionalItemInstance: Optional instance of status item.
action: Required. The action to be taken.