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

# Request DSA code execution [single] 

> Request a single DSA code execution. Please note that if you are running SQLite, you must pass `additionalFilesAsZip` as a ZIP file that must contain `db.sqlite` file (exact name) when unzipped.

Authentication with the "FERMION-API-KEY" header is required to use this endpoint.

Rate limit: Maximum 5000 requests in a window of 1m.



## OpenAPI

````yaml https://backend.codedamn.com/webhook/fermion-backend-openapi.yaml post /public/request-dsa-code-execution
openapi: 3.0.0
info:
  version: 1.0.0
  title: Fermion Backend API
  description: Documentation for interacting with the Fermion API
  contact:
    name: Fermion Support
    email: support@codedamn.com
servers:
  - url: https://backend.codedamn.com/api
    description: Fermion primary backend server
security: []
externalDocs:
  description: Fermion Docs
  url: https://docs.fermion.app
paths:
  /public/request-dsa-code-execution:
    post:
      tags:
        - DSA
      summary: 'Request DSA code execution [single] '
      description: >-
        Request a single DSA code execution. Please note that if you are running
        SQLite, you must pass `additionalFilesAsZip` as a ZIP file that must
        contain `db.sqlite` file (exact name) when unzipped.


        Authentication with the "FERMION-API-KEY" header is required to use this
        endpoint.


        Rate limit: Maximum 5000 requests in a window of 1m.
      requestBody:
        description: API Request Body
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      data:
                        type: object
                        properties:
                          language:
                            type: string
                            enum:
                              - C
                              - Cpp
                              - Java
                              - Python
                              - Nodejs
                              - Sqlite_3_48_0
                              - Golang_1_19
                              - Rust_1_87
                              - Dotnet_8
                              - Mysql_8
                            description: Programming language for code execution
                          runConfig:
                            type: object
                            properties:
                              customMatcherToUseForExpectedOutput:
                                anyOf:
                                  - type: string
                                    enum:
                                      - ExactMatch
                                      - IgnoreWhitespaceAtStartAndEnd
                                      - >-
                                        IgnoreWhitespaceAtStartAndEndCaseInsensitive
                                      - >-
                                        IgnoreWhitespaceAtStartAndEndForEveryLine
                                      - >-
                                        IgnoreWhitespaceAtStartAndEndForEveryLineCaseInsensitive
                                  - nullable: true
                                  - nullable: true
                              expectedOutputAsBase64UrlEncoded:
                                anyOf:
                                  - type: string
                                  - nullable: true
                                  - nullable: true
                              stdinStringAsBase64UrlEncoded:
                                anyOf:
                                  - type: string
                                  - nullable: true
                                  - nullable: true
                              callbackUrlOnExecutionCompletion:
                                anyOf:
                                  - type: string
                                    format: uri
                                    description: >-
                                      Provide a URL on which Fermion would sent
                                      a POST request with the result in body
                                      after execution is completed
                                  - nullable: true
                                  - nullable: true
                              shouldEnablePerProcessAndThreadCpuTimeLimit:
                                type: boolean
                                default: false
                              shouldEnablePerProcessAndThreadMemoryLimit:
                                type: boolean
                                default: false
                              shouldAllowInternetAccess:
                                type: boolean
                                default: false
                              compilerFlagString:
                                type: string
                                minLength: 0
                                maxLength: 512
                                default: ''
                              maxFileSizeInKilobytesFilesCreatedOrModified:
                                type: number
                                minimum: 0
                                maximum: 512000
                                default: 51200
                              stackSizeLimitInKilobytes:
                                type: number
                                minimum: 0
                                maximum: 128000
                                default: 65536
                              cpuTimeLimitInMilliseconds:
                                type: integer
                                minimum: 0
                                maximum: 5000
                                default: 2000
                              wallTimeLimitInMilliseconds:
                                type: integer
                                minimum: 0
                                maximum: 7000
                                default: 5000
                              memoryLimitInKilobyte:
                                type: integer
                                minimum: 0
                                maximum: 1024000
                                default: 512000
                              maxProcessesAndOrThreads:
                                type: integer
                                minimum: 1
                                maximum: 120
                                default: 60
                            description: >-
                              Configuration for code execution environment and
                              test cases
                          sourceCodeAsBase64UrlEncoded:
                            type: string
                            description: Source code to execute, encoded as base64url
                          additionalFilesAsZip:
                            anyOf:
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - base64url-encoding
                                    description: Encoding type for the additional files
                                  base64UrlEncodedZip:
                                    type: string
                                    description: >-
                                      ZIP file containing additional files
                                      (e.g., db.sqlite for SQLite), encoded as
                                      base64url
                                required:
                                  - type
                                  - base64UrlEncodedZip
                              - nullable: true
                              - nullable: true
                            description: >-
                              Optional additional files as a ZIP archive.
                              Required for SQLite with db.sqlite file.
                        required:
                          - language
                          - runConfig
                          - sourceCodeAsBase64UrlEncoded
                    required:
                      - data
              required:
                - data
      responses:
        '200':
          description: API Response Body
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    output:
                      anyOf:
                        - type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - ok
                            data:
                              type: object
                              properties:
                                taskId:
                                  type: string
                                  description: >-
                                    Unique identifier for the execution task,
                                    use this to get results
                              required:
                                - taskId
                          required:
                            - status
                            - data
                        - type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - error
                            errorMessage:
                              type: string
                          required:
                            - status
                            - errorMessage
                  required:
                    - output
      security:
        - FERMION-API-KEY: []
components:
  securitySchemes:
    FERMION-API-KEY:
      name: FERMION-API-KEY
      type: apiKey
      in: header

````