API Document
參考資料:
- http://www.slideshare.net/BenLue/hack-go
整體特性:
- 採 RESTful + SEF URL
- 符合 idempotent 特性
- 支援 json 格式輸出
- 支援 API version ( ex: /info , /v1.5/info, /v1.4/info , ... )
- 每一層都有 info
API 大綱:
- / ( 回信 ping 訊息 )
- /info
- /process/* ( 取得 process 資訊, ex: ps -aux )
- /network/* ( 取得網路相關資訊 )
- /network/info
- /network/arp
- /network/route
- /network/ifce ( ifconfig / ipconfig / ... )
- /filesystem/* ( 取得檔案系統資訊 )
- /filesystem/info
- /filesystem/mount
- /filesystem/df
- /devices/* ( 取得裝置元件資料 )
- /devices/help
- /devices/ ( sysfs )
- /devices/battery
- /devices/cpu ( cpuinfo )
- /devices/mem ( meminfo, memstats )