POST
/
curl --request POST \
    --url https://api.brewit.ai/v2/datasets/3fa85f64-5717-4562-b3fc-2c963f66afa6/resources \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer access-token' \
    --data '{
        "name": "resource name",
        "description": "resource description",
        "type": "db:postgres",
        "db_credentials": {...}
    }'
{
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "resource name",
    "description": "resource description",
    "type": "db:postgres",
    "db_credentials": {...},
    "dataset_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "owner_id": 1,
    "created_at": "2024-01-02T03:04:05.000000",
    "updated_at": "2024-01-02T03:04:05.000000"
}
curl --request POST \
    --url https://api.brewit.ai/v2/datasets/3fa85f64-5717-4562-b3fc-2c963f66afa6/resources \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer access-token' \
    --data '{
        "name": "resource name",
        "description": "resource description",
        "type": "db:postgres",
        "db_credentials": {...}
    }'
{
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "resource name",
    "description": "resource description",
    "type": "db:postgres",
    "db_credentials": {...},
    "dataset_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "owner_id": 1,
    "created_at": "2024-01-02T03:04:05.000000",
    "updated_at": "2024-01-02T03:04:05.000000"
}
dataset_id
string
required
The identifier of the dataset (workspace) to which the resource belongs.

Body Parameters

name
string
required
The name of the resource to display in the Brewit UI.
description
string
The description of the resource to display in the Brewit UI.
type
enum
required
The type of resource you are connecting to. Currently, we support: db:mysql (MySQL), db:postgres (PostgreSQL), dw:bigquery (BigQuery), dw:snowflake (Snowflake).
db_credentials
object
required
The credentials to connect to the resource. We will store the credentials securely and only display the insensitive fields (e.g. host, port, etc.) in the response.