-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move state endpoint to
beacon
namespace (#353)
Co-authored-by: Paul Harris <paul.harris@consensys.net>
- Loading branch information
Showing
4 changed files
with
75 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
get: | ||
operationId: "getState" | ||
summary: "Get full BeaconState object" | ||
description: | | ||
Returns full BeaconState object for given stateId. | ||
Depending on `Accept` header it can be returned either as json or as bytes serialized by SSZ | ||
tags: | ||
- Beacon | ||
parameters: | ||
- name: state_id | ||
in: path | ||
required: true | ||
$ref: '../../../beacon-node-oapi.yaml#/components/parameters/StateId' | ||
responses: | ||
"200": | ||
description: Success | ||
headers: | ||
Eth-Consensus-Version: | ||
$ref: '../../../beacon-node-oapi.yaml#/components/headers/Eth-Consensus-Version' | ||
content: | ||
application/json: | ||
schema: | ||
title: GetStateV2Response | ||
type: object | ||
properties: | ||
version: | ||
type: string | ||
enum: [ phase0, altair, bellatrix, capella, deneb ] | ||
example: "phase0" | ||
execution_optimistic: | ||
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" | ||
finalized: | ||
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized" | ||
data: | ||
oneOf: | ||
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/BeaconState' | ||
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconState" | ||
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconState" | ||
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconState" | ||
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.BeaconState" | ||
application/octet-stream: | ||
schema: | ||
description: "SSZ serialized state bytes. Use Accept header to choose this response type" | ||
"400": | ||
description: "Invalid state ID" | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" | ||
example: | ||
code: 400 | ||
message: "Invalid state ID: current" | ||
"404": | ||
description: "State not found" | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" | ||
example: | ||
code: 404 | ||
message: "State not found" | ||
"500": | ||
$ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters