/ apis / debug / state.v2.yaml
state.v2.yaml
 1  get:
 2    operationId: "getStateV2"
 3    summary: "Get full BeaconState object"
 4    description: |
 5       Returns full BeaconState object for given stateId.
 6       Depending on `Accept` header it can be returned either as json or as bytes serialized by SSZ
 7    tags:
 8      - Debug
 9    parameters:
10      - name: state_id
11        in: path
12        required: true
13        $ref: '../../beacon-node-oapi.yaml#/components/parameters/StateId'
14    responses:
15      "200":
16        description: Success
17        headers:
18          Eth-Consensus-Version:
19            $ref: '../../beacon-node-oapi.yaml#/components/headers/Eth-Consensus-Version'
20        content:
21          application/json:
22            schema:
23              title: GetStateV2Response
24              type: object
25              properties:
26                version:
27                  type: string
28                  enum: [ phase0, altair ]
29                  example: "phase0"
30                data:
31                  oneOf:
32                   - $ref: '../../beacon-node-oapi.yaml#/components/schemas/BeaconState'
33                   - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconState"
34          application/octet-stream:
35            schema:
36              description: "SSZ serialized state bytes. Use Accept header to choose this response type"
37      "400":
38        description: "Invalid state ID"
39        content:
40          application/json:
41            schema:
42              allOf:
43                - $ref: "../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
44                - example:
45                    code: 400
46                    message: "Invalid state ID: current"
47      "404":
48        description: "State not found"
49        content:
50          application/json:
51            schema:
52              allOf:
53                - $ref: "../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
54                - example:
55                    code: 404
56                    message: "State not found"
57      "500":
58        $ref: '../../beacon-node-oapi.yaml#/components/responses/InternalError'
59