Skip to content

feat(runtime): add runtime API discovery and call endpoints (incl. relay chain)#1949

Open
F-OBrien wants to merge 1 commit intoparitytech:masterfrom
F-OBrien:runtime-api-calls
Open

feat(runtime): add runtime API discovery and call endpoints (incl. relay chain)#1949
F-OBrien wants to merge 1 commit intoparitytech:masterfrom
F-OBrien:runtime-api-calls

Conversation

@F-OBrien
Copy link
Copy Markdown
Contributor

Summary

This PR adds full support for runtime API discovery and call endpoints.

New endpoints

  • GET /runtime/apis
  • GET /runtime/apis/{apiId}
  • POST /runtime/apis/{apiId}/{methodId}
  • GET /rc/runtime/apis
  • GET /rc/runtime/apis/{apiId}
  • POST /rc/runtime/apis/{apiId}/{methodId}

What this PR adds

  • New runtime API controllers/services for standard and relay-chain (rc) paths.
  • Runtime metadata parsing for API/method discovery with method input/output typing.
  • Runtime API invocation with named JSON parameters.
  • Parameter validation/normalization:
    • accepts method arg names and arg{index} aliases
    • supports omitted/null for Option<T> inputs
    • returns clear errors for unknown/missing params or unknown API/method names
  • Response type additions for runtime API summaries, details, and call results.
  • Chain config updates to enable RuntimeApis and RcRuntimeApis where runtime
    endpoints are already available.
  • OpenAPI v1 and v2 updates for new paths and schemas (including generic JSON
    result shape for runtime API call outputs).

Validation

  • Added unit tests for runtime API service behavior

Release notes

  • Feature: expose runtime API metadata and call endpoints for both primary
    and relay-chain contexts.

@F-OBrien F-OBrien requested a review from a team as a code owner April 20, 2026 08:59
@TarikGul
Copy link
Copy Markdown
Member

hey @F-OBrien, thanks for the PR as always. You consistently add quality work. We have actually rewritten sidecar in Rust for a few big reasons, but are no longer adding to this repo. We just posted the deprecation notice a few days ago. Here is the new repo: https://github.com/paritytech/polkadot-rest-api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants