From c8104c9612f907eaa6e04ed508c9d4e413574c4f Mon Sep 17 00:00:00 2001 From: krriscode <85664362+krriscode@users.noreply.github.com> Date: Wed, 17 Apr 2024 05:47:04 +0000 Subject: [PATCH] added block search apis endpoint Signed-off-by: krriscode <85664362+krriscode@users.noreply.github.com> --- app/swagger.json | 141 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) diff --git a/app/swagger.json b/app/swagger.json index 4ad3767a1..bf7d3041c 100644 --- a/app/swagger.json +++ b/app/swagger.json @@ -1221,6 +1221,147 @@ } ] } + }, + "/api/fetchBlockByTxId/{channel_genesis_hash}/{txnId}": { + "get": { + "tags": ["Blocks"], + "summary": "Query to fetch block details", + "operationId": "fetchBlockByTxId", + "parameters": [ + { + "name": "channel_genesis_hash", + "in": "path", + "description": "Please provide channel hash value", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "txnId", + "in": "path", + "description": "Please provide transaction id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": {} + }, + "400": { + "description": "Bad Request", + "content": {} + }, + "401": { + "description": "UnAuthorized", + "content": {} + }, + "404": { + "description": "Not found", + "content": {} + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/fetchBlockByHash/{channel_genesis_hash}/{block_hash}": { + "get": { + "tags": ["Blocks"], + "summary": "Query to fetch block details", + "operationId": "fetchBlockByHash", + "parameters": [ + { + "name": "channel_genesis_hash", + "in": "path", + "description": "Please provide channel hash value", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "block_hash", + "in": "path", + "description": "Please provide block hash", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": {} + }, + "400": { + "description": "Bad Request", + "content": {} + }, + "401": { + "description": "UnAuthorized", + "content": {} + }, + "404": { + "description": "Not found", + "content": {} + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/fetchEndorsersCommitter/{channel_genesis_hash}": { + "get": { + "tags": ["Channel"], + "summary": "Query to fetch all Endorsers and Committers of channel", + "operationId": "fetchEndorsersCommitter", + "parameters": [ + { + "name": "channel_genesis_hash", + "in": "path", + "description": "Please provide channel hash value", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": {} + }, + "400": { + "description": "Bad Request", + "content": {} + }, + "401": { + "description": "UnAuthorized", + "content": {} + }, + "404": { + "description": "Not found", + "content": {} + } + }, + "security": [ + { + "bearer": [] + } + ] + } } }, "components": {