Skip to content

Functions: UI Editor

The Foundry UI Editor lets you write, test, and deploy Python functions directly in the Falcon console — no CLI installation required.

The editor has three main areas:

  • File list (left) — Navigate between function files
  • Code editor (center) — Write Python code with syntax highlighting
  • Tabs (right) — Handlers, Test, Runtime Config, and Logs

Create a new function from the App Builder:

  1. Go to Functions in the App Builder.
  2. Click Create function.
  3. Select Python as the language.
  4. The editor opens with a sample handler.

The editor provides starter templates for common patterns. Click Templates to browse and insert a template into your function.

After writing your handler function, register it in the Handlers tab:

  1. Click the Handlers tab.
  2. Click Add handler.
  3. Provide the handler name and map it to your Python function.
  4. Toggle Share with workflows if you want the function callable from Fusion SOAR workflows.

Functions must be deployed before they can be tested in the UI Editor.

  1. Deploy your app by clicking Deploy in the App Builder toolbar.
  2. Switch to the Test tab in the editor.
  3. Provide test input as JSON.
  4. Click Run.
  5. Review the response output.

The editor provides a Logs tab that displays function execution logs via a pre-built LogScale query. Use print() statements in your Python code to write debug output:

def handle(request, config):
print("Processing request:", request.body)
# ... function logic
return {"body": {"status": "ok"}, "code": 200}

Log output appears in the Logs tab after execution.

The Runtime Config tab shows the API scopes your function requires. The editor automatically detects scopes based on FalconPy service class imports in your code.

For example, importing from falconpy import Hosts automatically adds the Hosts: Read scope. You can manually add or remove scopes in the Runtime Config tab if the auto-detection doesn’t cover your use case.

The UI Editor supports Python only. For JavaScript, Go, or TypeScript functions, use the Foundry CLI.

The browser editor does not support:

  • Local testing (functions must be deployed to test)
  • Custom dependencies beyond FalconPy and the standard library
  • Multi-file functions with shared utility modules

For these scenarios, use the Foundry CLI.