Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add peers v2 without meta #384

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions apis/node/peers.v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
get:
operationId: getPeersV2
tags:
- Node
summary: "Get node network peers"
description: "Retrieves data about the node's network peers. By default this returns all peers. Multiple query params are combined using AND conditions"
parameters:
- name: state
in: query
required: false
schema:
type: array
uniqueItems: true
items:
$ref: "../../beacon-node-oapi.yaml#/components/schemas/PeerConnectionState"
- name: direction
in: query
required: false
schema:
type: array
uniqueItems: true
items:
$ref: "../../beacon-node-oapi.yaml#/components/schemas/PeerConnectionDirection"
responses:
"200":
description: Request successful
content:
application/json:
schema:
title: GetPeersV2Response
type: object
properties:
data:
type: array
items:
$ref: "../../beacon-node-oapi.yaml#/components/schemas/Peer"

"500":
$ref: "../../beacon-node-oapi.yaml#/components/responses/InternalError"
2 changes: 2 additions & 0 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ paths:
$ref: "./apis/node/identity.yaml"
/eth/v1/node/peers:
$ref: "./apis/node/peers.yaml"
/eth/v2/node/peers:
$ref: "./apis/node/peers.v2.yaml"
/eth/v1/node/peers/{peer_id}:
$ref: "./apis/node/peer.yaml"
/eth/v1/node/peer_count:
Expand Down
Loading