> For the complete documentation index, see [llms.txt](https://developer.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.collibra.com/tutorials/get-the-ids-for-jdbc-schema-ingestion-with-the-rest-api.md).

# Get the IDs for JDBC schema ingestion with the REST API

When you use the `POST` method of the `/schemas/jdbc` endpoint of the Collibra Platform Catalog REST API to [register a data source](https://productresources.collibra.com/docs/collibra/latest/Default.htm#cshid=DOC0289) using a JDBC driver, you must provide the following Universally Unique Identifiers (UUIDs).

| Parameter                         | Description                                               |
| --------------------------------- | --------------------------------------------------------- |
| [**jdbcDriverId**](#jdbcDriverId) | The UUID of the desired JDBC driver.                      |
| [**ownerId**](#ownerId)           | The UUID of the owner of the registered data in Collibra. |
| [**jobServer**](#jobServer)       | The UUID of the Jobserver used for ingestion.             |

## Steps

{% stepper %}
{% step %}
Retrieve the UUID of the JDBC driver.

Use the `GET` method of the `/jdbc` endpoint of the Collibra Platform Core REST API.

```bash
curl -X GET 'https://<your_collibra_url>/rest/2.0/jdbc' \
-H 'Content-Type: application/json'
```

<i class="fa-chevrons-right">:chevrons-right:</i> The response contains the UUID of the drivers as `id`.

<img src="/files/AqlqwgKg2g6MDzGZgdHq" alt="" width="50%">

{% hint style="info" %}
You can add parameters such as the database name to retrieve just the driver you need.

```bash
curl -X GET 'https://<your_collibra_url>/rest/2.0/jdbc?databaseName=Oracle' \
-H 'Content-Type: application/json'
```

{% endhint %}

{% hint style="success" %}
The response also contains the required connection properties.

<img src="/files/5fdrvY1S5WFtY768vBFH" alt="" data-size="original">
{% endhint %}
{% endstep %}

{% step %}
Retrieve the UUID of the Collibra user who will be owner of the ingested schema.

Use the `GET` method of the `/users` endpoint of the Collibra Platform Core REST API with the **name** parameter.

```bash
curl -X GET 'https://<your_collibra_url>/rest/2.0/users?name=<username>' \
-H 'Content-Type: application/json'
```

<i class="fa-chevrons-right">:chevrons-right:</i> The response contains the UUID of the user as `id`.

{% hint style="success" %}
Use the `/users/current` endpoint to retrieve the UUID of the currently signed in user.

```bash
curl -X GET 'https://<your_collibra_url>/rest/2.0/users/current' \
-H 'Content-Type: application/json'
```

{% endhint %}
{% endstep %}

{% step %}
Retrieve the UUID of the Jobserver.

Use the `GET` method of the `/configuration/jobServerInstance` endpoint of the Collibra Platform Catalog REST API.

```bash
curl -X GET 'https://<your_collibra_url>/rest/catalog/1.0/configuration/jobServerInstance' \
-H 'Content-Type: application/json'
```

<i class="fa-chevrons-right">:chevrons-right:</i> The response contains the UUIDs of the Jobservers as `id`.
{% endstep %}

{% step %}
Use the UUIDs and the information about the connection parameters to build your API call.

```bash
curl -X POST 'https://<your_collibra_url>/rest/catalog/1.0/schemas/jdbc' \
-H 'Content-Type: application/json' \
-d '{
    "schemaName": "<name_of_Collibra_schema_asset>",
    "jdbcDriverId": "d89fde06-02ef-43de-ab40-43700c91da15",
    "properties": {
        "host": "<url_of_the_Oracle_database>",
        "port": "<database_system_identifier>",
        "schema": "<schema_you_want_to_connect_to>"
    },
    "user": "<database_username>",
    "description": "<description_of_Collibra_schema_asset>",
    "ownerId": "00000000-0000-0000-0000-000000900002",
    "jobServer": "9cb2202b-ac91-45a3-a7bd-cc5b6c965be3"
}'
```

The example lists the minimum data for a connection to an Oracle database.

{% hint style="success" %}
The **description** parameter is not mandatory but you should also provide a description for the Collibra schema asset as best practice.
{% endhint %}
{% endstep %}
{% endstepper %}
