diff --git a/openapi/Swarm.yaml b/openapi/Swarm.yaml index 8749081bf..04c17b0ee 100644 --- a/openapi/Swarm.yaml +++ b/openapi/Swarm.yaml @@ -1,13 +1,10 @@ openapi: 3.0.3 info: - version: 7.2.0 + version: 7.3.0 title: Bee API description: "A list of the currently provided Interfaces to interact with the swarm, implementing file operations and sending messages" -security: - - {} - externalDocs: description: Browse the documentation @ the Swarm Docs url: "https://docs.ethswarm.org" @@ -70,7 +67,7 @@ paths: $ref: "SwarmCommon.yaml#/components/schemas/ActGranteesCreateRequest" responses: "201": - description: Ok + description: OK content: application/json: schema: @@ -94,7 +91,7 @@ paths: description: Grantee list reference responses: "200": - description: Ok + description: OK content: application/json: schema: @@ -150,7 +147,7 @@ paths: $ref: "SwarmCommon.yaml#/components/schemas/ActGranteesPatchRequest" responses: "200": - description: Ok + description: OK content: application/json: schema: @@ -205,7 +202,7 @@ paths: format: binary responses: "201": - description: Ok + description: OK headers: "swarm-tag": $ref: "SwarmCommon.yaml#/components/headers/SwarmTag" @@ -318,7 +315,7 @@ paths: format: binary responses: "201": - description: Ok + description: OK headers: "swarm-tag": description: Tag UID if it was passed to the request `swarm-tag` header. @@ -405,7 +402,7 @@ paths: format: binary responses: "201": - description: Ok + description: OK headers: "swarm-tag": $ref: "SwarmCommon.yaml#/components/headers/SwarmTag" @@ -448,7 +445,7 @@ paths: - $ref: "SwarmCommon.yaml#/components/parameters/SwarmActHistoryAddress" responses: "200": - description: Ok + description: OK # "swarm-feed-index": # $ref: "SwarmCommon.yaml#/components/headers/SwarmFeedIndex" content: @@ -511,7 +508,7 @@ paths: - $ref: "SwarmCommon.yaml#/components/parameters/SwarmChunkRetrievalTimeoutParameter" responses: "200": - description: Ok + description: OK content: application/octet-stream: schema: @@ -654,7 +651,7 @@ paths: $ref: "SwarmCommon.yaml#/components/schemas/Address" responses: "200": - description: Ok + description: OK content: application/json: schema: @@ -1111,7 +1108,7 @@ paths: description: Postage batch to use for re-upload. If none is provided and the file was uploaded on the same node before, it will reuse the same batch. If not found, it will return error. If a new batch is provided, the chunks are stamped again with the new batch. responses: "200": - description: Ok + description: OK "400": $ref: "SwarmCommon.yaml#/components/responses/400" "404": @@ -1175,8 +1172,6 @@ paths: "/balances": get: summary: Get the balances with all known peers including prepaid services - security: - - bearerAuth: [] tags: - Balance responses: @@ -1194,8 +1189,6 @@ paths: "/balances/{address}": get: summary: Get the balances with a specific peer including prepaid services - security: - - bearerAuth: [] tags: - Balance parameters: @@ -1222,8 +1215,6 @@ paths: "/blocklist": get: summary: Get a list of blocklisted peers - security: - - bearerAuth: [] tags: - Connectivity responses: @@ -1241,8 +1232,6 @@ paths: "/consumed": get: summary: Get the past due consumption balances with all known peers - security: - - bearerAuth: [] tags: - Balance responses: @@ -1260,8 +1249,6 @@ paths: "/consumed/{address}": get: summary: Get the past due consumption balance with a specific peer - security: - - bearerAuth: [] tags: - Balance parameters: @@ -1288,8 +1275,6 @@ paths: "/chequebook/address": get: summary: Get the address of the chequebook contract used - security: - - bearerAuth: [] tags: - Chequebook responses: @@ -1303,8 +1288,6 @@ paths: "/chequebook/balance": get: summary: Get the balance of the chequebook - security: - - bearerAuth: [] tags: - Chequebook responses: @@ -1392,7 +1375,7 @@ paths: required: true responses: "201": - description: Ok + description: OK content: application/json: schema: @@ -1409,8 +1392,6 @@ paths: "/connect/{multiAddress}": post: summary: Connect to address - security: - - bearerAuth: [] tags: - Connectivity parameters: @@ -1438,8 +1419,6 @@ paths: "/reservestate": get: summary: Get reserve state - security: - - bearerAuth: [] tags: - Status responses: @@ -1455,8 +1434,6 @@ paths: "/chainstate": get: summary: Get chain state - security: - - bearerAuth: [] tags: - Status responses: @@ -1487,8 +1464,6 @@ paths: "/peers": get: summary: Get a list of peers - security: - - bearerAuth: [] tags: - Connectivity responses: @@ -1504,8 +1479,6 @@ paths: "/peers/{address}": delete: summary: Remove peer - security: - - bearerAuth: [] tags: - Connectivity parameters: @@ -1532,8 +1505,6 @@ paths: "/pingpong/{address}": post: summary: Try connection to node - security: - - bearerAuth: [] tags: - Connectivity parameters: @@ -1562,8 +1533,6 @@ paths: "/settlements/{address}": get: summary: Get amount of sent and received from settlements with a peer - security: - - bearerAuth: [] tags: - Settlements parameters: @@ -1590,8 +1559,6 @@ paths: "/settlements": get: summary: Get settlements with all known peers and total amount sent or received - security: - - bearerAuth: [] tags: - Settlements responses: @@ -1609,8 +1576,6 @@ paths: "/timesettlements": get: summary: Get time based settlements with all known peers and total amount sent or received - security: - - bearerAuth: [] tags: - Settlements responses: @@ -1628,8 +1593,6 @@ paths: "/topology": get: summary: Get topology of known network - security: - - bearerAuth: [] tags: - Connectivity responses: @@ -1643,8 +1606,6 @@ paths: "/welcome-message": get: summary: Get configured P2P welcome message - security: - - bearerAuth: [] tags: - Connectivity responses: @@ -1660,8 +1621,6 @@ paths: description: Default response post: summary: Set P2P welcome message - security: - - bearerAuth: [] tags: - Connectivity requestBody: @@ -1686,8 +1645,6 @@ paths: "/chequebook/cashout/{peer-id}": get: summary: Get last cashout action for the peer - security: - - bearerAuth: [] parameters: - in: path name: peer-id @@ -1712,8 +1669,6 @@ paths: description: Default response post: summary: Cashout the last cheque for the peer - security: - - bearerAuth: [] parameters: - in: path name: peer-id @@ -1744,8 +1699,6 @@ paths: "/chequebook/cheque/{peer-id}": get: summary: Get last cheques for the peer - security: - - bearerAuth: [] parameters: - in: path name: peer-id @@ -1772,8 +1725,6 @@ paths: "/chequebook/cheque": get: summary: Get last cheques for all peers - security: - - bearerAuth: [] tags: - Chequebook responses: @@ -1793,8 +1744,6 @@ paths: "/chequebook/deposit": post: summary: Deposit tokens from overlay address into chequebook - security: - - bearerAuth: [] parameters: - in: query name: amount @@ -1822,8 +1771,6 @@ paths: "/chequebook/withdraw": post: summary: Withdraw tokens from the chequebook to the overlay address - security: - - bearerAuth: [] parameters: - in: query name: amount @@ -1943,8 +1890,6 @@ paths: "/stamps": get: summary: Get stamps for this node - security: - - bearerAuth: [] tags: - Postage Stamps responses: @@ -1970,8 +1915,6 @@ paths: description: Swarm address of the stamp get: summary: Get an individual postage batch status - security: - - bearerAuth: [] tags: - Postage Stamps responses: @@ -1998,8 +1941,6 @@ paths: description: Swarm address of the stamp get: summary: Get extended bucket data of a batch - security: - - bearerAuth: [] tags: - Postage Stamps responses: @@ -2019,8 +1960,6 @@ paths: "/stamps/{amount}/{depth}": post: summary: Buy a new postage batch. - security: - - bearerAuth: [] description: | Be aware, this endpoint creates an on-chain transactions and transfers BZZ from the node's Ethereum account and hence directly manipulates the wallet balance! tags: @@ -2148,8 +2087,6 @@ paths: "/batches": get: summary: Get all globally available batches that were purchased by all nodes. - security: - - bearerAuth: [] tags: - Postage Stamps responses: @@ -2288,20 +2225,6 @@ paths: default: description: Default response - "/stake/migrate": - post: - summary: Withdraws all past staked amount back to the wallet. - description: Be aware, the endpoint call only be called when the contract is paused and is in the process of being migrated to a new contract. - tags: - - Staking - responses: - "200": - $ref: "SwarmCommon.yaml#/components/schemas/StakeTransactionResponse" - "500": - $ref: "SwarmCommon.yaml#/components/responses/500" - default: - description: Default response - "/stake/withdrawable": get: summary: Get the withdrawable staked amount. @@ -2310,7 +2233,11 @@ paths: - Staking responses: "200": - $ref: "SwarmCommon.yaml#/components/schemas/GetWithdrawableResponse" + description: OK + content: + application/json: + schema: + $ref: "SwarmCommon.yaml#/components/schemas/GetWithdrawableResponse" "500": $ref: "SwarmCommon.yaml#/components/responses/500" default: @@ -2325,7 +2252,11 @@ paths: - $ref: "SwarmCommon.yaml#/components/parameters/GasLimitParameter" responses: "200": - $ref: "SwarmCommon.yaml#/components/schemas/StakeTransactionResponse" + description: OK + content: + application/json: + schema: + $ref: "SwarmCommon.yaml#/components/schemas/StakeTransactionResponse" "400": $ref: "SwarmCommon.yaml#/components/responses/400" "500": @@ -2350,7 +2281,11 @@ paths: - $ref: "SwarmCommon.yaml#/components/parameters/GasLimitParameter" responses: "200": - $ref: "SwarmCommon.yaml#/components/schemas/StakeTransactionResponse" + description: OK + content: + application/json: + schema: + $ref: "SwarmCommon.yaml#/components/schemas/StakeTransactionResponse" "400": $ref: "SwarmCommon.yaml#/components/responses/400" "500": @@ -2366,7 +2301,11 @@ paths: - Staking responses: "200": - $ref: "SwarmCommon.yaml#/components/schemas/GetStakeResponse" + description: OK + content: + application/json: + schema: + $ref: "SwarmCommon.yaml#/components/schemas/GetStakeResponse" "500": $ref: "SwarmCommon.yaml#/components/responses/500" default: @@ -2381,7 +2320,11 @@ paths: - $ref: "SwarmCommon.yaml#/components/parameters/GasLimitParameter" responses: "200": - $ref: "SwarmCommon.yaml#/components/schemas/StakeTransactionResponse" + description: OK + content: + application/json: + schema: + $ref: "SwarmCommon.yaml#/components/schemas/StakeTransactionResponse" "400": $ref: "SwarmCommon.yaml#/components/responses/400" "500": @@ -2476,7 +2419,7 @@ paths: content: application/json: schema: - $ref: "SwarmCommon.yaml#/components/schemas/StatusResponse" + $ref: "SwarmCommon.yaml#/components/schemas/StatusPeersResponse" "400": $ref: "SwarmCommon.yaml#/components/responses/400" default: @@ -2498,14 +2441,3 @@ paths: $ref: "SwarmCommon.yaml#/components/responses/400" default: description: Default response. - -components: - securitySchemes: - basicAuth: - type: http - scheme: basic - - bearerAuth: - type: http - scheme: bearer - bearerFormat: SecurityToken diff --git a/openapi/SwarmCommon.yaml b/openapi/SwarmCommon.yaml index b8e97efc6..e4c30bc71 100644 --- a/openapi/SwarmCommon.yaml +++ b/openapi/SwarmCommon.yaml @@ -1,6 +1,6 @@ openapi: 3.0.3 info: - version: 4.2.0 + version: 4.3.0 title: Common Data Types description: | \*****bzzz***** @@ -29,6 +29,8 @@ components: $ref: "#/components/schemas/P2PUnderlay" ethereum: $ref: "#/components/schemas/EthereumAddress" + chain_address: + $ref: "#/components/schemas/EthereumAddress" publicKey: $ref: "#/components/schemas/PublicKey" pssPublicKey: @@ -828,24 +830,6 @@ components: isRetrievable: type: boolean - SecurityTokenRequest: - type: object - properties: - role: - type: string - nullable: false - expiry: - type: integer - nullable: false - description: Expiration time in seconds - - SecurityTokenResponse: - type: object - properties: - key: - type: string - nullable: false - LoggerExp: type: string description: Base 64 encoded regular expression or subsystem string. @@ -897,6 +881,8 @@ components: properties: overlay: $ref: "#/components/schemas/SwarmAddress" + proximity: + type: integer beeMode: type: string enum: @@ -905,8 +891,6 @@ components: - "dev" - "ultra-light" - "unknown" - proximity: - type: integer reserveSize: type: integer reserveSizeWithinRadius: @@ -922,7 +906,7 @@ components: requestFailed: nullable: true type: boolean - BatchCommitment: + batchCommitment: type: integer isReachable: type: boolean @@ -931,10 +915,10 @@ components: committedDepth: type: integer - StatusResponse: + StatusPeersResponse: type: object properties: - stamps: + snapshots: type: array nullable: false items: @@ -958,7 +942,7 @@ components: StatusNeighborhoodsResponse: type: object properties: - stamps: + neighborhoods: type: array nullable: false items: