diff --git a/apis/node/peers.v2.yaml b/apis/node/peers.v2.yaml new file mode 100644 index 00000000..1b68acc8 --- /dev/null +++ b/apis/node/peers.v2.yaml @@ -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" diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index 4b6477cb..70b4bd2f 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -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: