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

# Preview executor



## OpenAPI

````yaml https://dev.enneo.dev/api/mind/docs/open-api post /executor/preview
openapi: 3.0.0
info:
  version: '1'
  title: enneo.MIND API
  description: This describes the API of enneo Mind, the main ticketing backend
  contact:
    name: enneo GmbH
    email: richard@enneo.ai
  license:
    name: Proprietary software
    url: https://enneo.ai
servers:
  - url: https://demo.enneo.ai/api/mind
    description: Production server, demo client
  - url: https://main.enneo.dev/api/mind
    description: Development main branch
  - url: http://localhost:8005/api/mind
    description: Local development server
security:
  - bearerAuth:
      - api
  - cookieAuth:
      - api
paths:
  /executor/preview:
    post:
      tags:
        - Executor Sandbox
      summary: Preview executor
      operationId: previewExecutor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: The id of the executor
                  example: 123
                code:
                  type: string
                  description: The name of the executor
                  example: |
                    <?php

                     echo '{"success": true}';
                type:
                  type: string
                  description: The type of the executor
                  example: sourceCode
                language:
                  type: string
                  description: The language of the executor
                  example: php82
                packages:
                  type: string
                  description: The packages of the executor
                  example: ''
                parameters:
                  type: object
                  properties:
                    key1:
                      type: string
                      example: val1ö"\n*!
                    key2:
                      type: string
                      example: val'ue
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionResponse'
        '403':
          description: Unauthorized
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ExecutionResponse:
      type: object
      properties:
        duration:
          type: integer
          description: Duration of the execution in seconds
          example: 22
        exitCode:
          type: integer
          description: Exit code of the execution
          example: 0
        output:
          type: object
          properties:
            success:
              type: boolean
              description: Indicates if the execution was successful
              example: true
        stderr:
          type: string
          nullable: true
          description: Standard error output, if any
          example: null
        dependenciesCreated:
          type: boolean
          description: Indicates if dependencies were created during execution
          example: false
        localExecutionCommand:
          type: string
          nullable: true
          description: Command used for local execution, if any
          example: null
    Error:
      type: object
      description: Data format of Enneo error messages
      properties:
        error:
          type: string
          example: Contract 121 could not be processed
          description: Readable error message that should be shown to the user
        details:
          type: string
          example: >-
            Uncatched null point exception in testFunction() in
            /app/src/file:212
          description: Not easily readable error message that is for the developer
        txId:
          type: string
          example: c916167c94
          description: >-
            Internal transaction id. Useful for debugging. Corresponds to the
            OpenTelemetry trace ID.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT-based authentication
      x-scopes:
        api: Full access to the API
    cookieAuth:
      type: apiKey
      in: cookie
      name: connect.sid
      description: Cookie-based authentication
      x-scopes:
        api: Full access to the API

````