# Dataset Connection

## Databases

MySQL/PostgreSQL, SQL-Server Databases

For MySQL if a port is not specified the default port is 3306\
For PostgreSQL if a port is not specified the default port is 5432\
SQL-Server doesn't require a database port

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/engine/create-dataset/`

#### Headers

| Name                                           | Type | Description      |
| ---------------------------------------------- | ---- | ---------------- |
| Content-Type<mark style="color:red;">\*</mark> |      | application/json |

#### Request Body

| Name                                                   | Type   | Description                                       |
| ------------------------------------------------------ | ------ | ------------------------------------------------- |
| dataset\_name<mark style="color:red;">\*</mark>        | String |                                                   |
| database\_name<mark style="color:red;">\*</mark>       | String |                                                   |
| database\_url<mark style="color:red;">\*</mark>        | String |                                                   |
| server\_type<mark style="color:red;">\*</mark>         | String | can be any of mysql, postgresql, and sql\_server. |
| connection\_type<mark style="color:red;">\*</mark>     |        | database                                          |
| dataset\_description<mark style="color:red;">\*</mark> | String |                                                   |
| database\_user<mark style="color:red;">\*</mark>       | String |                                                   |
| database\_password<mark style="color:red;">\*</mark>   | String |                                                   |
| table\_name<mark style="color:red;">\*</mark>          | String | This is the specific table to be used as dataset  |
| database\_port<mark style="color:red;">\*</mark>       | String |                                                   |

MongoDB Database

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/engine/create-dataset/`

#### Headers

| Name         | Type | Description      |
| ------------ | ---- | ---------------- |
| Content-Type |      | application/json |

#### Request Body

| Name                                                   | Type   | Description                                   |
| ------------------------------------------------------ | ------ | --------------------------------------------- |
| dataset\_name<mark style="color:red;">\*</mark>        | String |                                               |
| database\_url<mark style="color:red;">\*</mark>        | String | This is the MongoDB URI                       |
| server\_type<mark style="color:red;">\*</mark>         | String | mongo                                         |
| connection\_type<mark style="color:red;">\*</mark>     | String | database                                      |
| dataset\_description<mark style="color:red;">\*</mark> | String |                                               |
| table\_name<mark style="color:red;">\*</mark>          | String | This is known as the collection name in mongo |
| database\_name<mark style="color:red;">\*</mark>       | String |                                               |

Oracle DB

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/engine/create-dataset/`

database\_url here refers to the Oracle connection string (connection\_string is of the format hostname/servicename). This is also known as the dsn (data source name). It helps in identifying which database service to connect to.

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | String | application/json |

#### Request Body

| Name                                                   | Type   | Description              |
| ------------------------------------------------------ | ------ | ------------------------ |
| dataset\_name<mark style="color:red;">\*</mark>        | String |                          |
| database\_password<mark style="color:red;">\*</mark>   | String |                          |
| database\_user<mark style="color:red;">\*</mark>       | String |                          |
| server\_type<mark style="color:red;">\*</mark>         | String | oracle                   |
| connection\_type<mark style="color:red;">\*</mark>     | String | database                 |
| dataset\_description<mark style="color:red;">\*</mark> | String |                          |
| database\_url<mark style="color:red;">\*</mark>        | String | Oracle connection string |
| table\_name<mark style="color:red;">\*</mark>          | String |                          |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autogon.ai/other-apis/dataset/dataset-connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
