Commit c1af7d40 authored by Ralph Pichler's avatar Ralph Pichler Committed by GitHub

add balance debug api to openapi (#546)

parent edb0068e
......@@ -29,6 +29,21 @@ components:
items:
$ref: '#/components/schemas/P2PUnderlay'
Balance:
type: object
properties:
peer:
$ref: '#/components/schemas/SwarmAddress'
balance:
type: integer
Balances:
type: object
properties:
balances:
type: array
items:
$ref: '#/components/schemas/Balance'
BzzChunksPinned:
type: object
......
......@@ -41,6 +41,49 @@ paths:
default:
description: Default response
'/balances':
get:
summary: Get the balances with all known peers
tags:
- Swarm Debug Endpoints
responses:
'200':
description: Own balances with all known peers
content:
application/json:
schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Balances'
'500':
$ref: 'SwarmCommon.yaml#/components/responses/500'
default:
description: Default response
'/balances/{address}':
get:
summary: Get the balances with a specific peer
tags:
- Swarm Debug Endpoints
parameters:
- in: path
name: address
schema:
$ref: 'SwarmCommon.yaml#/components/schemas/SwarmAddress'
required: true
description: Swarm address of peer
responses:
'200':
description: Peer is known
content:
application/json:
schema:
$ref: 'SwarmCommon.yaml#/components/schemas/Balance'
'404':
$ref: 'SwarmCommon.yaml#/components/responses/404'
'500':
$ref: 'SwarmCommon.yaml#/components/responses/500'
default:
description: Default response
'/chunks/{address}':
get:
summary: Check if chunk at address exists locally
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment