/ apis / beacon / blocks / headers.yaml
headers.yaml
 1  get:
 2    operationId: getBlockHeaders
 3    summary: Get block headers
 4    description: Retrieves block headers matching given query. By default it will fetch current head slot blocks.
 5    tags:
 6      - Beacon
 7    parameters:
 8      - name: slot
 9        in: query
10        required: false
11        schema:
12          allOf:
13            - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Uint64"
14            - example: ""
15      - name: parent_root
16        in: query
17        required: false
18        schema:
19          allOf:
20            - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Root"
21            - example: ""
22    
23    responses:
24      "200":
25        description: Success
26        content:
27          application/json:
28            schema:
29              title: GetBlockHeadersResponse
30              type: object
31              properties:
32                data:
33                  type: array
34                  items:
35                    type: object
36                    properties:
37                      root:
38                        $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Root"
39                      canonical:
40                        type: boolean
41                      header:
42                        $ref: "../../../beacon-node-oapi.yaml#/components/schemas/SignedBeaconBlockHeader"
43      "400":
44        description: "The block ID supplied could not be parsed"
45        content:
46          application/json:
47            schema:
48              allOf:
49                - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
50                - example:
51                    code: 400
52                    message: "Invalid block ID: current"
53      "500":
54        $ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"