mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 14:28:37 +00:00
Update HTTP API docs (#1010)
This commit is contained in:
57
book/src/http/node.md
Normal file
57
book/src/http/node.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Lighthouse REST API: `/node`
|
||||
|
||||
The `/node` endpoints provide information about the lighthouse beacon node.
|
||||
|
||||
## Endpoints
|
||||
|
||||
HTTP Path | Description |
|
||||
| --- | -- |
|
||||
[`/node/version`](#nodeversion) | Get the node's version.
|
||||
[`/node/syncing`](#nodesyncing) | Get the node's syncing status.
|
||||
|
||||
## `/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
|
||||
|
||||
```json
|
||||
"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
|
||||
|
||||
```json
|
||||
{
|
||||
is_syncing: true,
|
||||
sync_status: {
|
||||
starting_slot: 0,
|
||||
current_slot: 100,
|
||||
highest_slot: 200,
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user