Getting Started & Examples
Relevant source files
The following files were used as context for generating this wiki page:
The flext-oracle-oic extension provides advanced capabilities for interacting with Oracle Integration Cloud (OIC). It includes a unified client for API operations, a command-line interface (CLI) for common tasks, and a service-oriented architecture for integration lifecycle management. This module follows the FLEXT Unified Module Pattern, consolidating authentication, API operations, and enterprise error handling into a structured framework.
Sources: README.md:10-15, src/flext_oracle_oic/ext_client.py:16-24, src/flext_oracle_oic/main.py:11-17
Installation and Configuration
The project requires Python 3.13+ and utilizes pydantic-settings for configuration management. Core settings are encapsulated in FlextOracleOicSettings, which handles OIC base URLs and OAuth2 credentials.
Required Configuration Fields
| Field | Description | Type |
|---|---|---|
base_url | The OIC instance URL (e.g., https://...oraclecloud.com) | str |
oauth_client_id | Identity Cloud Service Client ID | str |
oauth_client_secret | Identity Cloud Service Client Secret | SecretStr |
oauth_token_url | OAuth2 Token endpoint URL | str |
Sources: pyproject.toml:34-45, tests/unit/test_basic.py:30-36, src/flext_oracle_oic/ext_client.py:46-48
Initializing the Client
The FlextOracleOicClient is the primary interface for API interaction. It supports context manager usage to ensure underlying FlextApi resources are cleaned up. Authentication is handled automatically via an OAuth2 client credentials flow.
The client manages the lifecycle of the connection, including token acquisition and storage.
Sources: src/flext_oracle_oic/ext_client.py:53-73, src/flext_oracle_oic/ext_client.py:126-134
Common Operations
Listing Integrations
The system allows listing integrations with support for pagination and status filtering. The following diagram illustrates the flow when the CLI or service calls for a list of integrations:
CRUD Operations
The FlextOracleOicIntegrationCrudMixin provides methods for managing integration artifacts.
- Create: Uses
POST /integrationsto deploy new definitions. - Fetch: Retrieves specific integration metadata by ID.
- Update: Uses
PUT /integrations/{id}for configuration changes. - Delete: Uses
DELETE /integrations/{id}to remove artifacts.
Sources: src/flext_oracle_oic/services/integration_crud.py:25-130
CLI Usage Patterns
The extension provides a CLI tool named flext-oracle-oic (also aliased as oracle-oic-ext).
Available Commands
| Command | Description |
|---|---|
test-connection | Validates the OIC endpoint and credentials. |
list-integrations | Enumerates published integrations in the instance. |
version | Displays the current extension version. |
Sources: src/flext_oracle_oic/main.py:129-158, pyproject.toml:112-113
Technical Standards & Constants
The project employs a FlextOracleOicConstants class (aliased as c) to ensure a single source of truth for API versions, integration statuses, and validation logic.
- API Version: Default is
v1. - Integration Statuses:
ACTIVATED,DEACTIVATED,DRAFT,RUNNING,STOPPED,ERROR. - Connection Types:
REST,SOAP,DATABASE,FILE,FTP.
Sources: src/flext_oracle_oic/constants.py:58-135
Summary
The flext-oracle-oic extension simplifies Oracle Integration Cloud operations by providing a high-level Pythonic interface over complex REST APIs. By leveraging the unified client and CLI, developers can integrate OIC management into larger automation workflows while ensuring adherence to enterprise security and error-handling standards.
Sources: README.md:10-15, src/flext_oracle_oic/main.py:114-127