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

# Get BRK Schema

> Fetches a BRK schema by its ID. The schema contains all the information needed to initialize and execute a BRK, including input fields, dependencies, and configuration parameters. This endpoint is typically used as the first step in executing a BRK, as you need the schema to properly initialize the BRK with the correct input fields.



## OpenAPI

````yaml POST /schema_from_id
openapi: 3.0.0
info:
  title: BRX API
  description: >-
    The BRX API provides comprehensive access to the BRX platform, allowing you
    to create, manage, and execute BRKs (BRX Knowledge Representations). This
    API enables seamless integration with your applications, automation of AI
    workflows, and programmatic control over your BRX resources.
  version: 1.0.0
  contact:
    name: BRX Support
    url: https://brx.ai
    email: jando@brx.ai
  termsOfService: https://brx.ai/terms
  license:
    name: Proprietary
    url: https://brx.ai/license
servers:
  - url: https://api.brx.ai
    description: Production API Server
  - url: https://staging-api.brx.ai
    description: Staging API Server
security:
  - apiKeyAuth: []
tags:
  - name: BRK Management
    description: Endpoints for creating, updating, and managing BRKs
  - name: BRK Execution
    description: Endpoints for executing and validating BRKs
  - name: Access Control
    description: Endpoints for managing access control to BRKs
  - name: API Key Management
    description: Endpoints for managing API keys
paths:
  /schema_from_id:
    post:
      tags:
        - BRK Management
      summary: Get BRK Schema
      description: >-
        Fetches a BRK schema by its ID. The schema contains all the information
        needed to initialize and execute a BRK, including input fields,
        dependencies, and configuration parameters. This endpoint is typically
        used as the first step in executing a BRK, as you need the schema to
        properly initialize the BRK with the correct input fields.
      operationId: getBrkSchema
      requestBody:
        description: Request containing the BRK ID to fetch
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - brxId
              properties:
                brxId:
                  type: string
                  description: The unique identifier of the BRK to fetch
                  example: brk-12345678-90ab-cdef-1234-567890abcdef
            examples:
              Simple:
                summary: Basic BRK ID request
                value:
                  brxId: brk-12345678-90ab-cdef-1234-567890abcdef
      responses:
        '200':
          description: BRK schema response containing the complete schema definition
          content:
            application/json:
              schema:
                type: object
                properties:
                  httpResponse:
                    type: object
                    properties:
                      isError:
                        type: boolean
                        description: Indicates whether the request resulted in an error
                        example: false
                      statusMsg:
                        type: string
                        description: A message describing the status of the request
                        example: BRK schema fetched successfully
                      brkObject:
                        type: string
                        description: >-
                          JSON string containing the complete BRK schema,
                          including input fields, dependencies, and
                          configuration parameters
                        example: >-
                          {"brxId":"brk-12345678-90ab-cdef-1234-567890abcdef","brxName":"Example
                          BRK","description":"An example BRK for
                          documentation","prompt":{"prompt":{"main":"This is the
                          main prompt template with
                          {{variable}}"}},"processParams":{"processType":0},"dependantBrxIds":{"main_brx_entry_schema":"brk-12345678-90ab-cdef-1234-567890abcdef"}}
                      brxId:
                        type: string
                        description: The ID of the BRK that was fetched
                        example: brk-12345678-90ab-cdef-1234-567890abcdef
              examples:
                Success:
                  summary: Successful BRK schema response
                  value:
                    httpResponse:
                      isError: false
                      statusMsg: BRK schema fetched successfully
                      brkObject: >-
                        {"brxId":"brk-12345678-90ab-cdef-1234-567890abcdef","brxName":"Example
                        BRK","description":"An example BRK for
                        documentation","prompt":{"prompt":{"main":"This is the
                        main prompt template with
                        {{variable}}"}},"processParams":{"processType":0},"dependantBrxIds":{"main_brx_entry_schema":"brk-12345678-90ab-cdef-1234-567890abcdef"}}
                      brxId: brk-12345678-90ab-cdef-1234-567890abcdef
        '400':
          description: >-
            Bad Request - The request was malformed or missing required
            parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                MissingBrxId:
                  summary: Missing BRK ID
                  value:
                    httpResponse:
                      isError: true
                      errorID: bad-request
                      statusMsg: 'Missing required parameter: brxId'
        '401':
          description: Unauthorized - Authentication credentials are missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InvalidApiKey:
                  summary: Invalid API Key
                  value:
                    httpResponse:
                      isError: true
                      errorID: unauthorized
                      statusMsg: Invalid API key
        '403':
          description: >-
            Forbidden - The authenticated user does not have permission to
            access the requested BRK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                NoPermission:
                  summary: No Permission
                  value:
                    httpResponse:
                      isError: true
                      errorID: forbidden
                      statusMsg: You do not have permission to access this BRK
        '404':
          description: Not Found - The requested BRK does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                BrkNotFound:
                  summary: BRK Not Found
                  value:
                    httpResponse:
                      isError: true
                      errorID: not-found
                      statusMsg: >-
                        BRK with ID 'brk-12345678-90ab-cdef-1234-567890abcdef'
                        not found
        '500':
          description: Internal Server Error - An unexpected error occurred on the server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                ServerError:
                  summary: Server Error
                  value:
                    httpResponse:
                      isError: true
                      errorID: server-error
                      statusMsg: >-
                        An unexpected error occurred while processing your
                        request
components:
  schemas:
    Error:
      type: object
      properties:
        httpResponse:
          type: object
          properties:
            isError:
              type: boolean
              example: true
            errorID:
              type: string
              example: error-id
            statusMsg:
              type: string
              example: Error message
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: key

````