Oracle Analytics Cloud offers powerful automation capabilities through agents (iBots) that can deliver reports, dashboards, and alerts on a scheduled basis. However, what if you need to trigger these executions programmatically from your local environment or integrate them into your existing automation workflows?
In this article, I’ll walk you through a Python script that enables you to execute Oracle Analytics Cloud iBots directly from your local server using the SOAP API, giving you greater flexibility and control over your analytics delivery.
Why Execute iBots Programmatically?
Before diving into the technical details, let’s consider some use cases where programmatic iBot execution is valuable:
- Custom Scheduling: Trigger reports based on external events or complex business logic that goes beyond standard scheduling
- Batch Processing: Execute multiple iBots in sequence as part of a larger data pipeline
- Integration: Incorporate analytics delivery into existing automation frameworks or DevOps workflows
- Dynamic Execution: Trigger reports based on real-time conditions or thresholds in your data
The Solution: A Python SOAP Client
The Python script described in this post leverages Oracle Analytics Cloud’s SOAP API to authenticate, execute iBots, and manage sessions. It’s designed to be simple, secure, and easily integrated into your automation workflows.
Key Features
- Secure Authentication: Supports multiple password input methods (command-line, file, or interactive prompt)
- Batch Execution: Process multiple iBots from a simple text file
- Session Management: Proper login and logout handling to manage resources
- Error Handling: Comprehensive error catching with helpful messages
- SSL Support: Includes guidance for SSL certificate configuration on macOS
How It Works
Prerequisites
Before using the Python script, ensure you have:
- Installed Python 3.x
- Installed the suds-jurko library (pip install suds-jurko)
- Access to your Oracle Analytics Cloud SOAP API WSDL URL
For example: https://oachost-xxyyzz-ia.analytics.ocp.oraclecloud.com/analytics-ws/saw.dll/wsdl/v12 - Valid Oracle Analytics Cloud credentials, with permissions to execute iBots
- List of iBot paths you want to execute
Script Architecture
The Python script follows a straightforward workflow:
- Read Input: Loads iBot paths from a text file (one per line)
- Authenticate: Establishes a SOAP connection and creates a session
- Execute: Iterates through each iBot and triggers execution
- Cleanup: Properly logs out and closes the session
Usage examples

Download schAgent.py script from GitHub
Basic usage
python schAgent.py --url "https://your-oac-instance/analytics-ws/saw.dll?wsdl" \
--username "your_username" \
--password "your_password" \
--input-file reports.txt
Using a password file (more secure)
python schAgent.py --url "https://your-oac-instance/analytics-ws/saw.dll?wsdl" \
--username "your_username" \
--password-file "/secure/path/password.txt" \
--input-file reports.txt
Using an interactive password prompt
python schAgent.py --url "https://your-oac-instance/analytics-ws/saw.dll?wsdl" \
--username "your_username" \
--input-file reports.txt
The script securely prompts for your password without echoing it to the terminal.
Input file format
Create a simple text file with one iBot path per line:
/shared/Reports/Sales_Daily_Summary
/shared/Reports/Inventory_Alert
/shared/Dashboards/Executive_Overview
Security considerations
The script implements several security best practices:
- No Hardcoded Credentials: Password can be provided with a secure file or interactive prompt
- Session Management: Sessions are properly terminated even if errors occur
- SSL Verification: Uses standard SSL certificate verification (with guidance for setup)
macOS SSL certificate note
If you encounter SSL certificate verification errors on macOS, run:
/Applications/Python\ 3.x/Install\ Certificates.command
Replace 3.x with your actual Python version.
Integration opportunities
This script can be easily integrated into:
- Cron Jobs: Schedule executions at specific times
- CI/CD Pipelines: Trigger reports after deployment or testing phases
- Data Orchestration Tools: Incorporate into Airflow, Luigi, or similar frameworks
- Event-Driven Architectures: Execute reports in response to webhooks or message queues
Example cron integration
# Execute daily reports at 6 AM
0 6 * * * /usr/bin/python3 /path/to/schAgent.py --url "..." --username "..." --password-file "/secure/password.txt"
Error handling and troubleshooting
The script provides clear error messages for common issues:
- File Not Found: Validates that the input file exists before attempting to connect
- SSL Errors: Provides specific guidance for certificate issues
- Authentication Failures: Reports login problems clearly
- Session Cleanup: Ensures proper logout even when errors occur
Limitations and considerations
- SOAP API Dependency: Requires that the SOAP API is enabled in your Oracle Analytics Cloud instance
- Network Access: Your local server must have network access to the Oracle Analytics Cloud instance
- Permissions: The user must have “execute” permissions for the specified iBots
- Synchronous Execution: The script triggers execution but doesn’t wait for completion or verify success
Conclusion
This Python script provides a simple, yet powerful way to automate Oracle Analytics Cloud iBot execution from your local environment. By leveraging the SOAP API, you gain programmatic control over your analytics deliveries, enabling integration with broader automation workflows and custom scheduling logic.
Whether you’re building complex data pipelines, integrating analytics into DevOps processes, or simply need more flexible scheduling options, this solution offers a foundation you can build upon.
Next steps
To get started:
- Install the required Python library: pip install suds-jurko.
- Gather your Oracle Analytics Cloud SOAP API URL and credentials.
- Create your input file with iBot paths.
- Test with a single iBot before scaling to batch operations.
- Integrate into your automation framework of choice.
Call to action
Have questions or suggestions for improvements or want to share your journey?
Feel free to share your experience using this Python script in your Oracle Analytics Cloud automation workflows with the Oracle Analytics Community.
Note: Always ensure you follow your organization’s security policies when storing credentials and accessing production systems programmatically.
