Advertisement
daylicron

Curl api

Nov 13th, 2017
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. curl -si -H "X-Auth-Token: $mytoken" https://librenms.example.com/api/v0/devices/$hostname
  2. HTTP/1.1 200 OK
  3. Date: Mon, 13 Nov 2017 14:18:43 GMT
  4. Server: Apache/2.4.25 (Debian)
  5. Transfer-Encoding: chunked
  6. Content-Type: application/json
  7.  
  8. {
  9. "status": "ok",
  10. "devices": [
  11. {
  12. "device_id": "354",
  13. "hostname": "hostname",
  14. "sysName": "hostname",
  15. "ip": "192.168.X.X",
  16. "community": "$community",
  17. "authlevel": null,
  18. "authname": null,
  19. "authpass": null,
  20. "authalgo": null,
  21. "cryptopass": null,
  22. "cryptoalgo": null,
  23. "snmpver": "v2c",
  24. "port": "161",
  25. "transport": "udp",
  26. "timeout": null,
  27. "retries": null,
  28. "snmp_disable": "0",
  29. "bgpLocalAs": null,
  30. "sysObjectID": "enterprises.8072.3.2.10",
  31. "sysDescr": "Linux hostname 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64",
  32. "sysContact": "Sysadmin (root@localhost)",
  33. "version": "4.9.0-4-amd64",
  34. "hardware": "Generic x86 64-bit",
  35. "features": null,
  36. "location": "Server Room",
  37. "os": "linux",
  38. "status": "1",
  39. "status_reason": "",
  40. "ignore": "0",
  41. "disabled": "0",
  42. "uptime": "1469957",
  43. "agent_uptime": "0",
  44. "last_polled": "2017-11-13 15:15:20",
  45. "last_poll_attempted": null,
  46. "last_polled_timetaken": "1.38",
  47. "last_discovered_timetaken": "1.14",
  48. "last_discovered": "2017-11-13 12:51:48",
  49. "last_ping": "2017-11-13 15:15:20",
  50. "last_ping_timetaken": "0.10",
  51. "purpose": null,
  52. "type": "server",
  53. "serial": null,
  54. "icon": "linux.svg",
  55. "poller_group": "0",
  56. "override_sysLocation": "0",
  57. "notes": null,
  58. "port_association_mode": "1"
  59. }
  60. ]
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement