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

API: New algod endpoint /v2/header/{round}/header omits transactions and cert from response #6163

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
78 changes: 78 additions & 0 deletions daemon/algod/api/algod.oas2.json
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,68 @@
}
}
},
"/v2/blocks/{round}/header": {
"get": {
"tags": [
"public",
"nonparticipating"
],
"produces": [
"application/json",
"application/msgpack"
],
"schemes": [
"http"
],
"summary": "Get the block header for the block on the given round.",
"operationId": "GetBlockHeader",
"parameters": [
{
"minimum": 0,
"type": "integer",
"description": "The round from which to fetch block header information.",
"name": "round",
"in": "path",
"required": true
},
{
"$ref": "#/parameters/format"
}
],
"responses": {
"200": {
"$ref": "#/responses/BlockHeaderResponse"
},
"400": {
"description": "Bad Request - Non integer number",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"401": {
"description": "Invalid API Token",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"404": {
"description": "None existing block ",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"default": {
"description": "Unknown Error"
}
}
}
},
"/v2/blocks/{round}/transactions/{txid}/proof": {
"get": {
"tags": [
Expand Down Expand Up @@ -5106,6 +5168,22 @@
}
}
},
"BlockHeaderResponse": {
"description": "Block header.",
"schema": {
"type": "object",
"required": [
"blockHeader"
],
"properties": {
"blockHeader": {
"description": "Block header data.",
"type": "object",
"x-algorand-format": "BlockHeader"
}
}
}
},
"TransactionProofResponse": {
"description": "Proof of transaction in a block.",
"schema": {
Expand Down
158 changes: 158 additions & 0 deletions daemon/algod/api/algod.oas3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,27 @@
},
"description": "Hash of a block header."
},
"BlockHeaderResponse": {
"content": {
"application/json": {
"schema": {
"properties": {
"blockHeader": {
"description": "Block header data.",
"properties": {},
"type": "object",
"x-algorand-format": "BlockHeader"
}
},
"required": [
"blockHeader"
],
"type": "object"
}
}
},
"description": "Block header."
},
"BlockLogsResponse": {
"content": {
"application/json": {
Expand Down Expand Up @@ -4203,6 +4224,143 @@
]
}
},
"/v2/blocks/{round}/header": {
"get": {
"operationId": "GetBlockHeader",
"parameters": [
{
"description": "The round from which to fetch block header information.",
"in": "path",
"name": "round",
"required": true,
"schema": {
"minimum": 0,
"type": "integer"
}
},
{
"description": "Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON.",
"in": "query",
"name": "format",
"schema": {
"enum": [
"json",
"msgpack"
],
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"blockHeader": {
"description": "Block header data.",
"properties": {},
"type": "object",
"x-algorand-format": "BlockHeader"
}
},
"required": [
"blockHeader"
],
"type": "object"
}
},
"application/msgpack": {
"schema": {
"properties": {
"blockHeader": {
"description": "Block header data.",
"properties": {},
"type": "object",
"x-algorand-format": "BlockHeader"
}
},
"required": [
"blockHeader"
],
"type": "object"
}
}
},
"description": "Block header."
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
},
"application/msgpack": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Request - Non integer number"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
},
"application/msgpack": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Invalid API Token"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
},
"application/msgpack": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "None existing block "
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
},
"application/msgpack": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Internal Error"
},
"default": {
"content": {},
"description": "Unknown Error"
}
},
"summary": "Get the block header for the block on the given round.",
"tags": [
"public",
"nonparticipating"
]
}
},
"/v2/blocks/{round}/lightheader/proof": {
"get": {
"operationId": "GetLightBlockHeaderProof",
Expand Down
Loading
Loading