lighthouse/book/src/http/node.md
Age Manning cb26ddebb1
Doc updates (#1226)
* Keep wallet name and password file in sync with commands

* Fix create validator example to include required param --count

The current example fails with v0.1.2 fails with "Must supply either --count or --at-most"  This change proposes passing count=1, esp'ly since "Creating another validator is easy" a couple of paragraphs down.

* Fix broken links to wallet-create

Wallet links result in file not found.  May be caused by the lack of `.md`?

* Include node/health in TOC

* Remove unnecessary book files

Co-authored-by: J Burnett <jburnett@users.noreply.github.com>
2020-06-01 11:34:16 +10:00

1.7 KiB

Lighthouse REST API: /node

The /node endpoints provide information about the lighthouse beacon node.

Endpoints

HTTP Path Description
/node/version Get the node's version.
/node/syncing Get the node's syncing status.
/node/health Get the node's health.

/node/version

Requests the beacon node's version.

HTTP Specification

Property Specification
Path /node/version
Method GET
JSON Encoding String
Query Parameters None
Typical Responses 200

Example Response

"Lighthouse-0.2.0-unstable"

/node/syncing

Requests the syncing status of the beacon node.

HTTP Specification

Property Specification
Path /node/syncing
Method GET
JSON Encoding Object
Query Parameters None
Typical Responses 200

Example Response

{
	is_syncing: true,
	sync_status: {
	    starting_slot: 0,
    	current_slot: 100,
    	highest_slot: 200,
	}
}

/node/health

Requests information about the health of the beacon node.

HTTP Specification

Property Specification
Path /node/health
Method GET
JSON Encoding Object
Query Parameters None
Typical Responses 200

Example Response

{
    "pid": 96160,
    "pid_num_threads": 30,
    "pid_mem_resident_set_size": 55476224,
    "pid_mem_virtual_memory_size": 2081382400,
    "sys_virt_mem_total": 16721076224,
    "sys_virt_mem_available": 7423197184,
    "sys_virt_mem_used": 8450183168,
    "sys_virt_mem_free": 3496345600,
    "sys_virt_mem_percent": 55.605743,
    "sys_loadavg_1": 1.56,
    "sys_loadavg_5": 2.61,
    "sys_loadavg_15": 2.43
}