Referencing code inside BlueCat Gateway - Platform - BlueCat Gateway - 24.1

Gateway Administration Guide

Locale
English
Product name
BlueCat Gateway
Version
24.1

Do not reference modules, classes, or functions inside the BlueCat Gateway application outside of those defined in the Address Manager REST v1 API reference. All other code is considered internal to BlueCat Gateway and may change or not behave in the same way (or even exist) in future versions of Gateway.

Exception: An exception is when you access the Gateway through Gateway's Flask application instance:

from main_app import app

Flask is a lightweight Python web framework for web applications. Gateway incorporates Flask to make it easier for workflow developers to build Gateway workflows in Python. You can use the app to access Flask properties and functions directly. To do so, use the @route() decorator instead of app.route(). For more details, see Editing a workflow script.

You can also use app.logger for writing directly to Apache logs. For more details, see Logging events and monitoring BlueCat Gateway status.