/ beacon-node-oapi.yaml
beacon-node-oapi.yaml
1 openapi: "3.0.3" 2 3 info: 4 title: "Eth Beacon Node API" 5 description: | 6 API specification for the beacon node, which enables users to query and participate in Ethereum 2.0 phase 0 beacon chain. 7 8 All requests by default send and receive JSON, and as such should have either or both of the "Content-Type: application/json" 9 and "Accept: application/json" headers. 10 In addition, some request can return data in the SSZ format. 11 To indicate that SSZ data is required in response to a request the header "Accept: application/octet-stream" should be sent. 12 Note that only a subset of requests can respond with data in SSZ format; these are noted in each individual request. 13 version: "Dev - Eth2Spec v1.1.0" 14 contact: 15 name: Ethereum Github 16 url: https://github.com/ethereum/beacon-apis/issues 17 license: 18 name: "Apache 2.0" 19 url: "https://www.apache.org/licenses/LICENSE-2.0.html" 20 21 servers: 22 - url: "{server_url}" 23 variables: 24 server_url: 25 description: "Beacon node API url" 26 default: "http://public-mainnet-node.ethereum.org/" 27 28 tags: 29 - name: Beacon 30 description: Set of endpoints to query beacon chain. 31 - name: Config 32 description: Endpoints to query chain configuration, specification, and fork schedules. 33 - name: Debug 34 description: Set of endpoints to debug chain and shouldn't be exposed publicly. 35 - name: Events 36 description: Set of endpoints to for event subscription. 37 - name: Node 38 description: Endpoints to query node related informations 39 - name: Validator 40 description: Endpoints intended for validator clients 41 - name: ValidatorRequiredApi 42 description: | 43 Minimal set of endpoints to enable a working validator implementation. 44 45 [Checkout validator flow](./validator-flow.md) to learn how to use this api. 46 paths: 47 48 /eth/v1/beacon/genesis: 49 $ref: "./apis/beacon/genesis.yaml" 50 /eth/v1/beacon/states/{state_id}/root: 51 $ref: "./apis/beacon/states/root.yaml" 52 /eth/v1/beacon/states/{state_id}/fork: 53 $ref: "./apis/beacon/states/fork.yaml" 54 /eth/v1/beacon/states/{state_id}/finality_checkpoints: 55 $ref: "./apis/beacon/states/finality_checkpoints.yaml" 56 /eth/v1/beacon/states/{state_id}/validators: 57 $ref: "./apis/beacon/states/validators.yaml" 58 /eth/v1/beacon/states/{state_id}/validators/{validator_id}: 59 $ref: "./apis/beacon/states/validator.yaml" 60 /eth/v1/beacon/states/{state_id}/validator_balances: 61 $ref: "./apis/beacon/states/validator_balances.yaml" 62 /eth/v1/beacon/states/{state_id}/committees: 63 $ref: "./apis/beacon/states/committee.yaml" 64 /eth/v1/beacon/states/{state_id}/sync_committees: 65 $ref: "./apis/beacon/states/sync_committees.yaml" 66 /eth/v1/beacon/headers: 67 $ref: "./apis/beacon/blocks/headers.yaml" 68 /eth/v1/beacon/headers/{block_id}: 69 $ref: "./apis/beacon/blocks/header.yaml" 70 /eth/v1/beacon/blocks: 71 $ref: "./apis/beacon/blocks/blocks.yaml" 72 /eth/v1/beacon/blocks/{block_id}: 73 $ref: "./apis/beacon/blocks/block.yaml" 74 /eth/v2/beacon/blocks/{block_id}: 75 $ref: "./apis/beacon/blocks/block.v2.yaml" 76 /eth/v1/beacon/blocks/{block_id}/root: 77 $ref: "./apis/beacon/blocks/root.yaml" 78 /eth/v1/beacon/blocks/{block_id}/attestations: 79 $ref: "./apis/beacon/blocks/attestations.yaml" 80 81 /eth/v1/beacon/pool/attestations: 82 $ref: "./apis/beacon/pool/attestations.yaml" 83 /eth/v1/beacon/pool/attester_slashings: 84 $ref: "./apis/beacon/pool/attester_slashings.yaml" 85 /eth/v1/beacon/pool/proposer_slashings: 86 $ref: "./apis/beacon/pool/proposer_slashings.yaml" 87 /eth/v1/beacon/pool/sync_committees: 88 $ref: "./apis/beacon/pool/sync_committees.yaml" 89 /eth/v1/beacon/pool/voluntary_exits: 90 $ref: "./apis/beacon/pool/voluntary_exists.yaml" 91 92 /eth/v1/debug/beacon/states/{state_id}: 93 $ref: './apis/debug/state.yaml' 94 /eth/v2/debug/beacon/states/{state_id}: 95 $ref: './apis/debug/state.v2.yaml' 96 /eth/v1/debug/beacon/heads: 97 $ref: './apis/debug/heads.yaml' 98 99 /eth/v1/node/identity: 100 $ref: "./apis/node/identity.yaml" 101 /eth/v1/node/peers: 102 $ref: "./apis/node/peers.yaml" 103 /eth/v1/node/peers/{peer_id}: 104 $ref: "./apis/node/peer.yaml" 105 /eth/v1/node/peer_count: 106 $ref: "./apis/node/peer_count.yaml" 107 /eth/v1/node/version: 108 $ref: "./apis/node/version.yaml" 109 /eth/v1/node/syncing: 110 $ref: "./apis/node/syncing.yaml" 111 /eth/v1/node/health: 112 $ref: "./apis/node/health.yaml" 113 114 /eth/v1/config/fork_schedule: 115 $ref: "./apis/config/fork_schedule.yaml" 116 /eth/v1/config/spec: 117 $ref: "./apis/config/spec.yaml" 118 /eth/v1/config/deposit_contract: 119 $ref: "./apis/config/deposit_contract.yaml" 120 121 /eth/v1/validator/duties/attester/{epoch}: 122 $ref: "./apis/validator/duties/attester.yaml" 123 /eth/v1/validator/duties/proposer/{epoch}: 124 $ref: "./apis/validator/duties/proposer.yaml" 125 /eth/v1/validator/duties/sync/{epoch}: 126 $ref: "./apis/validator/duties/sync.yaml" 127 /eth/v1/validator/blocks/{slot}: 128 $ref: "./apis/validator/block.yaml" 129 /eth/v2/validator/blocks/{slot}: 130 $ref: "./apis/validator/block.v2.yaml" 131 /eth/v1/validator/attestation_data: 132 $ref: "./apis/validator/attestation_data.yaml" 133 /eth/v1/validator/aggregate_attestation: 134 $ref: "./apis/validator/aggregate_attestation.yaml" 135 /eth/v1/validator/aggregate_and_proofs: 136 $ref: "./apis/validator/aggregate_and_proofs.yaml" 137 /eth/v1/validator/beacon_committee_subscriptions: 138 $ref: "./apis/validator/beacon_committee_subscriptions.yaml" 139 /eth/v1/validator/sync_committee_subscriptions: 140 $ref: "./apis/validator/sync_committee_subscriptions.yaml" 141 /eth/v1/validator/sync_committee_contribution: 142 $ref: "./apis/validator/sync_committee_contribution.yaml" 143 /eth/v1/validator/contribution_and_proofs: 144 $ref: "./apis/validator/sync_committee_contribution_and_proof.yaml" 145 146 /eth/v1/events: 147 $ref: "./apis/eventstream/index.yaml" 148 149 150 components: 151 schemas: 152 BeaconState: 153 $ref: './types/state.yaml#/BeaconState' 154 BeaconBlock: 155 $ref: './types/block.yaml#/BeaconBlock' 156 SignedBeaconBlock: 157 $ref: './types/block.yaml#/SignedBeaconBlock' 158 SignedBeaconBlockHeader: 159 $ref: './types/block.yaml#/SignedBeaconBlockHeader' 160 ValidatorResponse: 161 $ref: './types/api.yaml#/ValidatorResponse' 162 ValidatorBalanceResponse: 163 $ref: './types/api.yaml#/ValidatorBalanceResponse' 164 ValidatorStatus: 165 $ref: './types/api.yaml#/ValidatorStatus' 166 Committee: 167 $ref: './types/api.yaml#/Committee' 168 AttesterSlashing: 169 $ref: './types/attester_slashing.yaml#/AttesterSlashing' 170 ProposerSlashing: 171 $ref: './types/proposer_slashing.yaml#/ProposerSlashing' 172 SignedVoluntaryExit: 173 $ref: './types/voluntary_exit.yaml#/SignedVoluntaryExit' 174 AttesterDuty: 175 $ref: './types/validator.yaml#/AttesterDuty' 176 ProposerDuty: 177 $ref: './types/validator.yaml#/ProposerDuty' 178 Altair.SyncDuty: 179 $ref: './types/validator.yaml#/Altair/SyncDuty' 180 SignedAggregateAndProof: 181 $ref: './types/validator.yaml#/SignedAggregateAndProof' 182 Attestation: 183 $ref: './types/attestation.yaml#/Attestation' 184 AttestationData: 185 $ref: './types/attestation.yaml#/AttestationData' 186 Fork: 187 $ref: './types/misc.yaml#/Fork' 188 Checkpoint: 189 $ref: './types/misc.yaml#/Checkpoint' 190 Uint64: 191 $ref: './types/primitive.yaml#/Uint64' 192 NetworkIdentity: 193 $ref: './types/p2p.yaml#/NetworkIdentity' 194 Peer: 195 $ref: './types/p2p.yaml#/Peer' 196 PeerId: 197 $ref: './types/p2p.yaml#/PeerId' 198 PeerConnectionState: 199 $ref: './types/p2p.yaml#/PeerConnectionState' 200 PeerConnectionDirection: 201 $ref: './types/p2p.yaml#/PeerConnectionDirection' 202 GenesisTime: 203 $ref: './types/primitive.yaml#/GenesisTime' 204 Version: 205 $ref: './types/primitive.yaml#/Version' 206 ForkVersion: 207 $ref: './types/primitive.yaml#/ForkVersion' 208 DependentRoot: 209 $ref: './types/primitive.yaml#/DependentRoot' 210 Root: 211 $ref: './types/primitive.yaml#/Root' 212 Hex: 213 $ref: './types/primitive.yaml#/Hex' 214 Graffiti: 215 $ref: './types/primitive.yaml#/Graffiti' 216 Signature: 217 $ref: './types/primitive.yaml#/Signature' 218 ErrorMessage: 219 $ref: './types/http.yaml#/ErrorMessage' 220 IndexedErrorMessage: 221 $ref: './types/http.yaml#/IndexedErrorMessage' 222 Altair.SignedBeaconBlock: 223 $ref: './types/altair/block.yaml#/Altair/SignedBeaconBlock' 224 Altair.BeaconBlock: 225 $ref: './types/altair/block.yaml#/Altair/BeaconBlock' 226 Altair.BeaconState: 227 $ref: './types/altair/state.yaml#/Altair/BeaconState' 228 Altair.SyncCommitteeSignature: 229 $ref: './types/altair/sync_committee.yaml#/Altair/SyncCommitteeSignature' 230 Altair.SyncCommitteeSubscription: 231 $ref: './types/altair/sync_committee.yaml#/Altair/SyncCommitteeSubscription' 232 Altair.ContributionAndProof: 233 $ref: './types/altair/sync_committee.yaml#/Altair/ContributionAndProof' 234 Altair.SignedContributionAndProof: 235 $ref: './types/altair/sync_committee.yaml#/Altair/SignedContributionAndProof' 236 Altair.SyncCommitteeContribution: 237 $ref: './types/altair/sync_committee.yaml#/Altair/SyncCommitteeContribution' 238 Altair.SyncCommittee: 239 $ref: './types/altair/sync_committee.yaml#/Altair/SyncCommitteeByValidatorIndices' 240 241 parameters: 242 StateId: 243 $ref: './params/index.yaml#/StateId' 244 BlockId: 245 $ref: './params/index.yaml#/BlockId' 246 247 responses: 248 InvalidRequest: 249 $ref: './types/http.yaml#/InvalidRequest' 250 InternalError: 251 $ref: './types/http.yaml#/InternalError' 252 CurrentlySyncing: 253 $ref: './types/http.yaml#/CurrentlySyncing' 254 255 headers: 256 Eth-Consensus-Version: 257 description: Required in response so client can deserialize returned json or ssz data more effectively. 258 schema: 259 type: string 260 enum: [phase0, altair] 261 example: "phase0"