Kusama rc pallets API

The rc pallets API from Kusama — 13 operation(s) for rc pallets.

OpenAPI Specification

kusama-rc-pallets-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Substrate API Sidecar accounts rc pallets API
  description: '> ⚠️ **Deprecation Notice** — `substrate-api-sidecar` is deprecated in favor of

    > [`polkadot-rest-api`](https://github.com/paritytech/polkadot-rest-api), a ground-up Rust rewrite

    > built on [`subxt`](https://github.com/paritytech/subxt) with 1:1 API compatibility (endpoints

    > served under `/v1/`, e.g. `/v1/blocks/head`), stable memory under sustained load, significantly

    > lower latency and higher throughput, and native SCALE decoding via `parity-scale-codec`.

    >

    > **Migrate today:** Docker `paritytech/polkadot-rest-api:v0.1.0` ·

    > [crate](https://crates.io/crates/polkadot-rest-api) ·

    > [migration guide](https://github.com/paritytech/polkadot-rest-api/blob/main/docs/guides/MIGRATION.md) ·

    > [docs](https://paritytech.github.io/polkadot-rest-api/) ·

    > [issues](https://github.com/paritytech/polkadot-rest-api/issues)


    Substrate API Sidecar is a REST service that makes it easy to interact with blockchain nodes

    built using Substrate''s FRAME framework.

    '
  contact:
    url: https://github.com/paritytech/substrate-api-sidecar
  license:
    name: GPL-3.0-or-later
    url: https://github.com/paritytech/substrate-api-sidecar/blob/master/LICENSE
  version: 20.14.1
servers:
- url: https://polkadot-public-sidecar.parity-chains.parity.io/
  description: Polkadot Parity public sidecar
- url: https://kusama-public-sidecar.parity-chains.parity.io/
  description: Kusama Parity public sidecar
- url: https://polkadot-asset-hub-public-sidecar.parity-chains.parity.io/
  description: Polkadot Asset Hub Parity public sidecar
- url: https://kusama-asset-hub-public-sidecar.parity-chains.parity.io/
  description: Kusama Asset Hub Parity public sidecar
- url: http://localhost:8080
  description: Localhost
tags:
- name: rc pallets
paths:
  /rc/pallets/on-going-referenda:
    get:
      tags:
      - rc pallets
      summary: Get relay chain ongoing referenda.
      description: Returns information about ongoing referenda in the relay chain.
      operationId: getRcPalletsOnGoingReferenda
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve relay chain referenda information.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletsOnGoingReferenda'
        '400':
          description: invalid blockId supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rc/pallets/{palletId}/consts:
    get:
      tags:
      - rc pallets
      summary: Get a list of constants for a relay chain pallet.
      description: Returns a list of constant metadata for the specified relay chain pallet.
      operationId: getRcPalletsConsts
      parameters:
      - name: palletId
        in: path
        description: Name or index of the pallet to read constants from.
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to retrieve relay chain pallet constants.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: onlyIds
        in: query
        description: Only return constant IDs, not values and metadata.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletConstants'
        '400':
          description: invalid palletId supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rc/pallets/{palletId}/consts/{constantItemId}:
    get:
      tags:
      - rc pallets
      summary: Get a constant from a relay chain pallet by its ID.
      description: Returns information about a specific constant from the specified relay chain pallet.
      operationId: getRcPalletsConstsItem
      parameters:
      - name: palletId
        in: path
        description: Name or index of the pallet to read the constant from.
        required: true
        schema:
          type: string
      - name: constantItemId
        in: path
        description: Name of the constant to retrieve.
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to retrieve relay chain pallet constant.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: metadata
        in: query
        description: Include metadata for the constant.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletConstantsItem'
        '400':
          description: invalid palletId or constantItemId supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rc/pallets/{palletId}/dispatchables:
    get:
      tags:
      - rc pallets
      summary: Get a list of dispatchables for a relay chain pallet.
      description: Returns a list of dispatchable metadata for the specified relay chain pallet.
      operationId: getRcPalletsDispatchables
      parameters:
      - name: palletId
        in: path
        description: Name or index of the pallet to read dispatchables from.
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to retrieve relay chain pallet dispatchables.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: onlyIds
        in: query
        description: Only return dispatchable IDs, not values and metadata.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletDispatchables'
        '400':
          description: invalid palletId supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rc/pallets/{palletId}/dispatchables/{dispatchableItemId}:
    get:
      tags:
      - rc pallets
      summary: Get a dispatchable from a relay chain pallet by its ID.
      description: Returns information about a specific dispatchable from the specified relay chain pallet.
      operationId: getRcPalletsDispatchablesItem
      parameters:
      - name: palletId
        in: path
        description: Name or index of the pallet to read the dispatchable from.
        required: true
        schema:
          type: string
      - name: dispatchableItemId
        in: path
        description: Name of the dispatchable to retrieve.
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to retrieve relay chain pallet dispatchable.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: metadata
        in: query
        description: Include metadata for the dispatchable.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletDispatchablesItem'
        '400':
          description: invalid palletId or dispatchableItemId supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rc/pallets/{palletId}/errors:
    get:
      tags:
      - rc pallets
      summary: Get a list of errors for a relay chain pallet.
      description: Returns a list of error metadata for the specified relay chain pallet.
      operationId: getRcPalletsErrors
      parameters:
      - name: palletId
        in: path
        description: Name or index of the pallet to read errors from.
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to retrieve relay chain pallet errors.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: onlyIds
        in: query
        description: Only return error IDs, not values and metadata.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletErrors'
        '400':
          description: invalid palletId supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rc/pallets/{palletId}/errors/{errorItemId}:
    get:
      tags:
      - rc pallets
      summary: Get an error from a relay chain pallet by its ID.
      description: Returns information about a specific error from the specified relay chain pallet.
      operationId: getRcPalletsErrorsItem
      parameters:
      - name: palletId
        in: path
        description: Name or index of the pallet to read the error from.
        required: true
        schema:
          type: string
      - name: errorItemId
        in: path
        description: Name of the error to retrieve.
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to retrieve relay chain pallet error.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: metadata
        in: query
        description: Include metadata for the error.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletErrorsItem'
        '400':
          description: invalid palletId or errorItemId supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rc/pallets/{palletId}/events:
    get:
      tags:
      - rc pallets
      summary: Get a list of events for a relay chain pallet.
      description: Returns a list of event metadata for the specified relay chain pallet.
      operationId: getRcPalletsEvents
      parameters:
      - name: palletId
        in: path
        description: Name or index of the pallet to read events from.
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to retrieve relay chain pallet events.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: onlyIds
        in: query
        description: Only return event IDs, not values and metadata.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletEvents'
        '400':
          description: invalid palletId supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rc/pallets/{palletId}/events/{eventItemId}:
    get:
      tags:
      - rc pallets
      summary: Get an event from a relay chain pallet by its ID.
      description: Returns information about a specific event from the specified relay chain pallet.
      operationId: getRcPalletsEventsItem
      parameters:
      - name: palletId
        in: path
        description: Name or index of the pallet to read the event from.
        required: true
        schema:
          type: string
      - name: eventItemId
        in: path
        description: Name of the event to retrieve.
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to retrieve relay chain pallet event.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: metadata
        in: query
        description: Include metadata for the event.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletEventsItem'
        '400':
          description: invalid palletId or eventItemId supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rc/pallets/{palletId}/storage:
    get:
      tags:
      - rc pallets
      summary: Get a list of storage items for a relay chain pallet.
      description: Returns a list of storage item metadata for the specified relay chain pallet.
      operationId: getRcPalletsStorage
      parameters:
      - name: palletId
        in: path
        description: Name or index of the pallet to read storage items from.
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to retrieve relay chain pallet storage items.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: onlyIds
        in: query
        description: Only return storage item IDs, not values and metadata.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletStorage'
        '400':
          description: invalid palletId supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rc/pallets/{palletId}/storage/{storageItemId}:
    get:
      tags:
      - rc pallets
      summary: Get a storage item from a relay chain pallet by its ID.
      description: Returns the value stored under the specified storage item ID from the relay chain pallet. For maps, query parameter keys are required.
      operationId: getRcPalletsStorageItem
      parameters:
      - name: palletId
        in: path
        description: Name or index of the pallet to read the storage item from.
        required: true
        schema:
          type: string
      - name: storageItemId
        in: path
        description: Name of the storage item to retrieve.
        required: true
        schema:
          type: string
      - name: at
        in: query
        description: Block at which to retrieve relay chain pallet storage item.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      - name: keys
        in: query
        description: Storage map keys for map-type storage items. Required for map and double map storage items.
        required: false
        schema:
          type: array
          items:
            type: string
      - name: metadata
        in: query
        description: Include metadata for the storage item.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PalletStorageItem'
        '400':
          description: invalid palletId, storageItemId, or keys supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rc/pallets/staking/progress:
    get:
      tags:
      - rc pallets
      summary: Get progress on the general Staking pallet system on Relay Chain.
      description: Returns information on the progress of key components of the staking system and estimates of future points of interest. If you are querying from Asset Hub for staking progress, this endpoint requires multi chain connections between the relay chain, and asset hub itself. Set the asset hub rpc to SAS_SUBSTRATE_URL, and add the relay chain to the SAS_SUBSTRATE_MULTI_CHAIN_URL env var. Refer to the README for the structure of the env vars. The `useRcBlock` parameter allows querying Asset Hub state using relay chain block numbers, enabling post-migration infrastructure to continue using relay chain block identifiers while accessing Asset Hub data.
      operationId: getRcStakingProgress
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve a staking progress report.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/StakingProgress'
                - type: array
                  items:
                    $ref: '#/components/schemas/StakingProgress'
                description: Returns a single object when using standard parameters. Returns an array when using 'useRcBlock' parameter (array contains one object per Asset Hub block found, or empty array if none found).
        '400':
          description: invalid blockId supplied for at query param, or invalid parameter combination
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rc/pallets/staking/validators:
    get:
      tags:
      - rc pallets
      summary: Get all validators (active/waiting) of a specific chain.
      description: Returns a list of all validators addresses and their corresponding status which can be either active or waiting. For declared validators, it also includes their commission rate (as parts-per-billion) and nomination blocking status. It will also return a list of active validators that will not be part of the next era for staking. They will be under the key "validatorsToBeChilled". It's important to note, that addresses can be present in both the "validators" key, and "validatorsToBeChilled". Commission and blocked properties are not present for active validators that have been chilled.
      operationId: getRcStakingValidators
      parameters:
      - name: at
        in: query
        description: Block at which to retrieve the list of validators.
        required: false
        schema:
          type: string
          description: Block identifier, as the block height or block hash.
          format: unsignedInteger or $hex
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StakingValidators'
        '400':
          description: invalid blockId supplied for at query param, or invalid parameter combination
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UnappliedSlash:
      type: object
      properties:
        validator:
          type: string
          description: Stash account ID of the offending validator.
          format: ss58
        own:
          type: string
          description: The amount the validator will be slashed.
          format: unsignedInteger
        others:
          type: array
          description: Array of tuples(`[accountId, amount]`) representing all the stashes of other slashed stakers and the amount they will be slashed.
          items:
            type: string
            format: tuple[ss58, unsignedInteger]
        reporters:
          type: array
          description: Array of account IDs of the reporters of the offense.
          items:
            type: string
            format: ss58
        payout:
          type: string
          description: Amount of bounty payout to reporters.
          format: unsignedInteger
    PalletErrorsItem:
      type: object
      properties:
        pallet:
          type: string
          description: Name of the pallet.
          example: democracy
        palletIndex:
          type: string
          description: Index of the pallet for looking up errors.
          example: '14'
        errorItem:
          type: string
          description: Name of the error item.
          example: ValueLow
        metadata:
          $ref: '#/components/schemas/PalletErrorsItemMetadata'
        rcBlockHash:
          type: string
          description: The relay chain block hash used for the query. Only present when `useRcBlock` parameter is used.
        rcBlockNumber:
          type: string
          description: The relay chain block number used for the query. Only present when `useRcBlock` parameter is used.
        ahTimestamp:
          type: string
          description: The Asset Hub block timestamp. Only present when `useRcBlock` parameter is used.
    PalletStorage:
      type: object
      properties:
        pallet:
          type: string
          description: Name of the pallet.
          example: democracy
        palletIndex:
          type: string
          description: Index of the pallet for looking up storage.
          example: '15'
        items:
          type: array
          items:
            $ref: '#/components/schemas/PalletStorageItemMetadata'
          description: Array containing metadata for each storage entry of the pallet.
        rcBlockHash:
          type: string
          description: The relay chain block hash used for the query. Only present when `useRcBlock` parameter is used.
        rcBlockNumber:
          type: string
          description: The relay chain block number used for the query. Only present when `useRcBlock` parameter is used.
        ahTimestamp:
          type: string
          description: The Asset Hub block timestamp. Only present when `useRcBlock` parameter is used.
    PalletConstantsItemMetadata:
      type: object
      properties:
        name:
          type: string
          example: VotingPeriod
          description: The constant item's name (which is the same as the constant item's ID).
        type:
          type: string
          example: '4'
        value:
          type: string
          example: '0x00270600'
          description: The hex value of the constant
        docs:
          type: string
          example: "Information concerning any given constant.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
      description: Metadata of an constant item from a FRAME pallet.
    PalletConstants:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        pallet:
          type: string
          description: Name of the pallet.
          example: democracy
        palletIndex:
          type: string
          description: Index of the pallet for looking up constants.
          example: '14'
        items:
          type: array
          items:
            $ref: '#/components/schemas/PalletConstantsItemMetadata'
          description: Array containing metadata for each constant entry of the pallet.
        rcBlockHash:
          type: string
          description: The relay chain block hash used for the query. Only present when `useRcBlock` parameter is used.
        rcBlockNumber:
          type: string
          description: The relay chain block number used for the query. Only present when `useRcBlock` parameter is used.
        ahTimestamp:
          type: string
          description: The Asset Hub block timestamp. Only present when `useRcBlock` parameter is used.
    PalletDispatchablesItemMetadata:
      type: object
      properties:
        name:
          type: string
          example: propose
          description: The dispatchable item's name (which is the same as the dispatchable item's ID).
        fields:
          type: array
          items:
            type: string
        index:
          type: string
          example: '0'
          description: The index of the dispatchable item in the lists of pallet dispatchables.
        docs:
          type: string
          example: "Information concerning any given dispatchable.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
        args:
          type: array
          items:
            type: string
      description: Metadata of a dispatchable item from a FRAME pallet.
    BlockIdentifiers:
      type: object
      properties:
        hash:
          type: string
          description: The block's hash.
          format: hex
        height:
          type: string
          description: The block's height.
          format: unsignedInteger
    PalletDispatchablesItem:
      type: object
      properties:
        pallet:
          type: string
          description: Name of the pallet.
          example: democracy
        palletIndex:
          type: string
          description: Index of the pallet for looking up dispatchables.
          example: '14'
        dispatchableItem:
          type: string
          description: Name of the dispatchable item.
          example: vote
        metadata:
          $ref: '#/components/schemas/PalletDispatchablesItemMetadata'
        rcBlockHash:
          type: string
          description: The relay chain block hash used for the query. Only present when `useRcBlock` parameter is used.
        rcBlockNumber:
          type: string
          description: The relay chain block number used for the query. Only present when `useRcBlock` parameter is used.
          format: unsignedInteger
        ahTimestamp:
          type: string
          description: The Asset Hub block timestamp. Only present when `useRcBlock` parameter is used.
          format: unsignedInteger
    StakingValidators:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        validators:
          type: array
          items:
            type: object
            properties:
              address:
                type: string
                description: Address of validator.
              status:
                type: string
                description: Status of individual validator (active/waiting).
              commission:
                type: string
                description: The validator's commission rate as parts-per-billion (e.g., "100000000" = 10%). Not present for chilled validators.
              blocked:
                type: boolean
                description: Whether the validator is blocked from receiving new nominations. Not present for chilled validators.
        validatorsToBeChilled:
          description: Validators that will not be participating in the next era.
          type: array
          items:
            type: object
            properties:
              address:
                type: string
                description: Address of validator.
              status:
                type: string
                description: Status of individual validator (active/waiting).
        rcBlockHash:
          type: string
          description: The relay chain block hash used for the query. Only present when `useRcBlock` parameter is used.
        rcBlockNumber:
          type: string
          description: The relay chain block number used for the query. Only present when `useRcBlock` parameter is used.
          format: unsignedInteger
        ahTimestamp:
          type: string
          description: The Asset Hub block timestamp. Only present when `useRcBlock` parameter is used.
          format: unsignedInteger
    PalletDispatchables:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        pallet:
          type: string
          description: Name of the pallet.
          example: democracy
        palletIndex:
          type: string
          description: Index of the pallet for looking up dispatchables.
          example: '14'
        items:
          type: array
          items:
            $ref: '#/components/schemas/PalletDispatchablesItemMetadata'
          description: Array containing metadata for each dispatchable entry of the pallet.
        rcBlockHash:
          type: string
          description: The relay chain block hash used for the query. Only present when `useRcBlock` parameter is used.
        rcBlockNumber:
          type: string
          description: The relay chain block number used for the query. Only present when `useRcBlock` parameter is used.
          format: unsignedInteger
        ahTimestamp:
          type: string
          description: The Asset Hub block timestamp. Only present when `useRcBlock` parameter is used.
          format: unsignedInteger
    PalletEvents:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        pallet:
          type: string
          description: Name of the pallet.
          example: democracy
        palletIndex:
          type: string
          description: Index of the pallet for looking up events.
          example: '14'
        items:
          type: array
          items:
            $ref: '#/components/schemas/PalletEventsItemMetadata'
          description: Array containing metadata for each event entry of the pallet.
        rcBlockHash:
          type: string
          description: The relay chain block hash used for the query. Only present when `useRcBlock` parameter is used.
        rcBlockNumber:
          type: string
          description: The relay chain block number used for the query. Only present when `useRcBlock` parameter is used.
        ahTimestamp:
          type: string
          description: The Asset Hub block timestamp. Only present when `useRcBlock` parameter is used.
    PalletStorageItem:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        pallet:
          type: string
          description: Name of the pallet.
          example: democracy
        palletIndex:
          type: string
          description: Index of the pallet for looking up storage.
          example: '15'
        storageItem:
          type: string
          description: Name of the storage item.
          example: referendumInfoOf
        keys:
          type: array
          items:
            type: string
          description: N Storage keys passed in as the `keys` query param.
          example:
          - '0x00'
          - '0x01'
        value:
          type: object
          description: Value returned by this storage query.
          example:
            Ongoing:
              end

# --- truncated at 32 KB (43 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kusama/refs/heads/main/openapi/kusama-rc-pallets-api-openapi.yml