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

# Test a single node

> Executes a single workflow node in isolation with a provided context. This is a powerful debugging tool to test a node's logic without running an entire workflow.



## OpenAPI

````yaml /api/en/workflows.yaml post /workflows/test-node
openapi: 3.0.3
info:
  title: Altostrat Workflows API
  version: 1.0.0
  description: >-
    Create, validate, execute, and monitor SDX workflows through the public
    `/workflows` gateway path. The reference intentionally omits internal
    dashboard-builder and local development endpoints.
servers:
  - url: https://v1.api.altostrat.io
    description: Altostrat SDX Production API
security: []
tags:
  - name: Workflows
    description: Manage workflow definitions, the core automation blueprints.
  - name: Workflow Runs
    description: Execute, monitor, and manage individual workflow executions.
  - name: Vault
    description: Securely store and manage secrets used by your workflows.
  - name: Webhooks
    description: Endpoints for triggering workflows from external systems.
  - name: Utilities
    description: Helper endpoints for building and debugging workflows.
  - name: Workflow Logs
    description: Inspect workflow execution logs and aggregate log statistics.
  - name: Authorizations
    description: Manage delegated account authorization for workflow runs.
paths:
  /workflows/test-node:
    post:
      tags:
        - Utilities
      summary: Test a single node
      description: >-
        Executes a single workflow node in isolation with a provided context.
        This is a powerful debugging tool to test a node's logic without running
        an entire workflow.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestNodeRequest'
      responses:
        '200':
          description: The node executed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  output:
                    type: object
                    description: The JSON output from the node's execution.
                    additionalProperties: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: The node execution failed or the configuration was invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: >-
                          A human-readable error message explaining why the
                          execution failed.
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - BearerAuth: []
components:
  schemas:
    TestNodeRequest:
      type: object
      required:
        - node
      properties:
        node:
          $ref: '#/components/schemas/WorkflowNode'
        context:
          type: object
          additionalProperties: true
          description: >-
            A mock context object, simulating the state of a workflow run before
            this node is executed.
          example:
            n1:
              trigger_type: manual
              run_id: fl_run_example
        authorization_id:
          type: string
          nullable: true
          description: >-
            The prefixed ID of an Authorization to use if the node requires it
            (e.g., `altostrat_api`).
          example: auth_01H...
    WorkflowNode:
      type: object
      required:
        - id
        - type
        - data
        - position
      properties:
        id:
          type: string
          description: >-
            A unique identifier for the node within the workflow (e.g., 'n1',
            'trigger').
          example: n1
        type:
          type: string
          description: The UI identifier for the node type.
          example: manual_trigger
        position:
          type: object
          properties:
            x:
              type: number
            'y':
              type: number
          example:
            x: 150
            'y': 250
        data:
          type: object
          required:
            - componentId
          properties:
            componentId:
              type: string
              description: The backend identifier for the node's logic.
              example: manual_trigger
          additionalProperties: true
          description: >-
            A flexible object containing the specific configuration for this
            node type.
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          description: A broad category for the error (e.g., 'invalid_request_error').
          example: invalid_request_error
        code:
          type: string
          description: A short, unique string identifying the specific error.
          example: parameter_missing
        message:
          type: string
          description: A human-readable description of what went wrong.
          example: The 'name' parameter is required for this request.
        doc_url:
          type: string
          description: >-
            A direct link to the documentation page for this specific error
            code.
          example: https://docs.altostrat.io/errors/parameter_missing
  responses:
    BadRequest:
      description: >-
        Bad Request - The request was malformed, missing required parameters, or
        invalid. The response body will contain details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: >-
        Unauthorized - The request requires authentication, but a valid token
        was not provided.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServerError:
      description: Internal Server Error - An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Standard JWT for user sessions obtained via Altostrat authentication.

````