Skip to content

Commit b6f2bbd

Browse files
authored
p2p/simulations: update doc of HTTP endpoints (#29894)
1 parent c732039 commit b6f2bbd

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

p2p/simulations/README.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -123,20 +123,25 @@ The API is initialised with a particular node adapter and has the following
123123
endpoints:
124124

125125
```
126-
GET / Get network information
127-
POST /start Start all nodes in the network
128-
POST /stop Stop all nodes in the network
129-
GET /events Stream network events
130-
GET /snapshot Take a network snapshot
131-
POST /snapshot Load a network snapshot
132-
POST /nodes Create a node
133-
GET /nodes Get all nodes in the network
134-
GET /nodes/:nodeid Get node information
135-
POST /nodes/:nodeid/start Start a node
136-
POST /nodes/:nodeid/stop Stop a node
137-
POST /nodes/:nodeid/conn/:peerid Connect two nodes
138-
DELETE /nodes/:nodeid/conn/:peerid Disconnect two nodes
139-
GET /nodes/:nodeid/rpc Make RPC requests to a node via WebSocket
126+
OPTIONS / Response 200 with "Access-Control-Allow-Headers"" header set to "Content-Type""
127+
GET / Get network information
128+
POST /start Start all nodes in the network
129+
POST /stop Stop all nodes in the network
130+
POST /mocker/start Start the mocker node simulation
131+
POST /mocker/stop Stop the mocker node simulation
132+
GET /mocker Get a list of available mockers
133+
POST /reset Reset all properties of a network to initial (empty) state
134+
GET /events Stream network events
135+
GET /snapshot Take a network snapshot
136+
POST /snapshot Load a network snapshot
137+
POST /nodes Create a node
138+
GET /nodes Get all nodes in the network
139+
GET /nodes/:nodeid Get node information
140+
POST /nodes/:nodeid/start Start a node
141+
POST /nodes/:nodeid/stop Stop a node
142+
POST /nodes/:nodeid/conn/:peerid Connect two nodes
143+
DELETE /nodes/:nodeid/conn/:peerid Disconnect two nodes
144+
GET /nodes/:nodeid/rpc Make RPC requests to a node via WebSocket
140145
```
141146

142147
For convenience, `nodeid` in the URL can be the name of a node rather than its

0 commit comments

Comments
 (0)