# Oracle Oracle API

Source: https://userguide.qualytics.io/source-datastore/datastore/jdbc/oracle/how-tos/api/

## Creating a Source Datastore

This section provides sample payloads for creating an Oracle datastore. Replace the placeholder values with actual data relevant to your setup.

**Endpoint**: `/api/datastores (post)`

**Tab: New Connection (SID)**

```json
{
    "name": "your_datastore_name",
    "teams": ["Public"],
    "schema": "oracle_schema",
    "enrichment_only": false,
    "trigger_sync": true,
    "connection": {
        "name": "your_connection_name",
        "type": "oracle",
        "host": "oracle_host",
        "port": 1521,
        "username": "oracle_username",
        "password": "oracle_password",
        "parameters": {
            "authentication_type": "SID",
            "sid": "orcl",
            "protocol": "TCP"
        }
    }
}
```

**Tab: New Connection (Service Name)**

```json
{
    "name": "your_datastore_name",
    "teams": ["Public"],
    "schema": "oracle_schema",
    "enrichment_only": false,
    "trigger_sync": true,
    "connection": {
        "name": "your_connection_name",
        "type": "oracle",
        "host": "oracle_host",
        "port": 1521,
        "username": "oracle_username",
        "password": "oracle_password",
        "parameters": {
            "authentication_type": "SERVICE_NAME",
            "service_name": "orclpdb1",
            "protocol": "TCP"
        }
    }
}
```

**Tab: Existing Connection**

```json
{
    "name": "your_datastore_name",
    "teams": ["Public"],
    "schema": "oracle_schema",
    "enrichment_only": false,
    "trigger_sync": true,
    "connection_id": 123
}
```

**Tab: Using the CLI**

```bash
# Step 1: Create a Connection
qualytics connections create \
    --type oracle \
    --name "your_connection_name" \
    --host ${ORACLE_HOST} \
    --port 1521 \
    --username ${ORACLE_USER} \
    --password ${ORACLE_PASSWORD}

# Step 2: Create a Source Datastore
qualytics datastores create \
    --name "your_datastore_name" \
    --connection-name "your_connection_name" \
    --schema your_schema
```

> **Note: No database field**
>
> Oracle datastores are scoped by schema, so there is no `database` in the payload.

> **Note: Connect By**
>
> `authentication_type` selects how the instance is addressed: `SID` with a `sid`, or `SERVICE_NAME` with a `service_name`. Left out, it defaults to `SID`. `protocol` accepts `TCP` or `TCPS` and defaults to `TCP`.

## Link an Enrichment Destination

An Oracle datastore cannot be used as an enrichment datastore, so link one that uses a supported connector:

**Endpoint Details:** `/api/datastores/{datastore-id}/enrichment/{enrichment-id} (patch)`

*Last updated: November 16, 2026.*
