HTTP API - Get Device Status: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=== 9.1 Request === '''POST <nowiki>https://gateway_ip/api/get_status</nowiki>''' === 9.2 Request Parameter === {| class="wikitable" |'''Parameter''' |'''Type''' |'''Description''' |- | colspan="3" |'''Required Parameter''' |- |performance | | |} == 9.3 Response Parameter == {| class="wikitable" |'''Parameter''' |'''Type''' |'''Description''' |- |cpu_used |String |CPU usage |- |flash_total |String |flash size |- |flash_used |Strin...") |
No edit summary Tag: 2017 source edit |
||
Line 1: | Line 1: | ||
'''POST <nowiki>https://gateway_ip/api/get_status</nowiki>''' | '''POST <nowiki>https://gateway_ip/api/get_status</nowiki>''' | ||
Request Parameters: | |||
{| class="wikitable" | {| class="wikitable" | ||
|'''Parameter''' | |'''Parameter''' | ||
Line 15: | Line 14: | ||
|} | |} | ||
Response Parameters: | |||
{| class="wikitable" | {| class="wikitable" | ||
|'''Parameter''' | |'''Parameter''' | ||
Line 54: | Line 53: | ||
|} | |} | ||
Example: | |||
Request: | |||
curl -k --anyauth -u admin:admin -d '["performance"]' -H "Content-Type: application/json" <nowiki>https://gateway_ip/api/get_status</nowiki> | curl -k --anyauth -u admin:admin -d '["performance"]' -H "Content-Type: application/json" <nowiki>https://gateway_ip/api/get_status</nowiki> | ||
Response: | |||
<nowiki>{"performance":{"cpu_used":"39","flash_total":"27648","flash_used":"17428"," memory_total":"109448","memory_cached":"34192","memory_buffers":"0","memory_ free":"58928","memory_used":"50520"}}</nowiki> | <nowiki>{"performance":{"cpu_used":"39","flash_total":"27648","flash_used":"17428"," memory_total":"109448","memory_cached":"34192","memory_buffers":"0","memory_ free":"58928","memory_used":"50520"}}</nowiki> |
Revision as of 15:01, 5 May 2024
POST https://gateway_ip/api/get_status
Request Parameters:
Parameter | Type | Description |
Required Parameter | ||
performance |
Response Parameters:
Parameter | Type | Description |
cpu_used | String | CPU usage |
flash_total | String | flash size |
flash_used | String | Used flash size |
memory_total | String | Memory size |
memory_cached | String | Cache size |
memory_buffers | String | Buffer size |
memory_free | String | Free memory size |
memory_used | String | Used memory size |
Example:
Request: curl -k --anyauth -u admin:admin -d '["performance"]' -H "Content-Type: application/json" https://gateway_ip/api/get_status
Response: {"performance":{"cpu_used":"39","flash_total":"27648","flash_used":"17428"," memory_total":"109448","memory_cached":"34192","memory_buffers":"0","memory_ free":"58928","memory_used":"50520"}}