> ## Documentation Index
> Fetch the complete documentation index at: https://docs.molpha.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Dry-run a template's source

> Derives the request, then runs its source once on a node, unsigned. The answer is status only: whether every input was read, the block each chain input was pinned to, the upstream's HTTP status on a refusal, the decoded fields' names and types, and the stage a failure stopped at. It never carries the value: a value comes from a signed round. Private sources are refused. Rate-limited per client address (429).



## OpenAPI

````yaml data-openapi.json POST /v1/data/dry-run
openapi: 3.1.0
info:
  description: >-
    Every Molpha Data template has its own routes on the gateway. `GET
    /v1/data/<template>` (the template ID with each dot a slash, e.g.
    `token.supply` is `/v1/data/token/supply`) returns the threshold-signed
    value: the template's parameters are query parameters, the gateway derives
    the source and runs a round on it. Pay with a sign-in session
    (`Authorization: Bearer`, one unit of your plan's quota) or with x402:
    without a session the first answer is `402` with the quote in
    `PAYMENT-REQUIRED`; send the same request again with `PAYMENT-SIGNATURE`.
    The value's answer is the execute routes' own (`AttestationResponse`, errors
    as `{status, error}`); failures before the round (a wrong parameter, an
    unknown chain) use the data error body. `/source` and `/dry-run` under each
    template are free and rate-limited per address. To sign with RequestAuth
    instead of a session, take the source from `/source` and post it to `POST
    /v1/round/execute`.
  title: Molpha Data
  version: '1'
servers:
  - url: https://gateway.molpha.io
    description: Molpha gateway (Solana devnet release)
security: []
tags:
  - name: Catalog and sources
  - name: Wallet
  - name: Chain
  - name: DEX
  - name: Derived
  - name: Reference data
  - name: Yield
  - name: Raw state
  - name: Lending
  - name: Oracle
  - name: Perps
  - name: Position
  - name: Token
paths:
  /v1/data/dry-run:
    post:
      tags:
        - Catalog and sources
      summary: Dry-run a template's source
      description: >-
        Derives the request, then runs its source once on a node, unsigned. The
        answer is status only: whether every input was read, the block each
        chain input was pinned to, the upstream's HTTP status on a refusal, the
        decoded fields' names and types, and the stage a failure stopped at. It
        never carries the value: a value comes from a signed round. Private
        sources are refused. Rate-limited per client address (429).
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataRequest'
        description: Template with parameters, or a source
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataDryRunResponse'
        '400':
          description: Malformed body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataErrorResponse'
        '422':
          description: A parameter or the source is wrong
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataErrorResponse'
        '429':
          description: Too many requests from this address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataErrorResponse'
        '503':
          description: No node could run the source now; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataErrorResponse'
      security: []
components:
  schemas:
    DataRequest:
      properties:
        params:
          additionalProperties:
            type: string
          type: object
        source:
          type: object
        template:
          example: token.supply
          type: string
      type: object
    DataDryRunResponse:
      properties:
        canonical:
          type: string
        chain:
          type: string
        dryRun:
          $ref: '#/components/schemas/DataDryRunStatus'
        facts:
          additionalProperties:
            type: string
          type: object
        layout:
          items:
            type: object
          type: array
        mode:
          enum:
            - exact
            - tolerance
          type: string
        params:
          additionalProperties:
            type: string
          type: object
        source:
          type: object
        sourceId:
          type: string
        template:
          example: token.supply@1
          type: string
      type: object
    DataErrorResponse:
      properties:
        error:
          properties:
            code:
              example: PARAM_INVALID
              type: string
            input:
              type: string
            message:
              type: string
            stage:
              type: string
          type: object
      type: object
    DataDryRunStatus:
      properties:
        error:
          additionalProperties:
            type: string
          type: object
        inputs:
          items:
            $ref: '#/components/schemas/DataDryRunInput'
          type: array
        status:
          enum:
            - ok
            - failed
          type: string
      type: object
    DataDryRunInput:
      properties:
        block:
          type: integer
        durationMs:
          type: integer
        error:
          example: failed
          type: string
        fields:
          description: Fields are the decoded fields' names and types, without values.
          items:
            additionalProperties:
              type: string
            type: object
          type: array
        httpStatus:
          type: integer
        kind:
          enum:
            - http
            - evm
            - starknet
            - svm
          type: string
        name:
          type: string
        observedAtMs:
          type: integer
        ok:
          type: boolean
      type: object

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.