Skip to main content
POST
/
api
/
v1
/
sources
/
curl --request POST \ --url https://api.camelai.com/api/v1/sources/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "type": "POSTGRES", "hostname": "localhost", "port": 5432, "username": "postgres", "password": "password", "database_name": "mydb", "selected_schemas": [ "public", "analytics" ] } '
{ "type": "POSTGRES", "hostname": "localhost", "port": 5432, "username": "postgres", "password": "password", "database_name": "mydb", "selected_schemas": [ "public", "analytics" ] }

Authorizations

Authorization
string
header
required

API key authentication using Bearer scheme

Body

application/json

Serializer for PostgreSQL connection configuration.

type
string
required

Connection type identifier. Must be POSTGRES

Minimum string length: 1
account_name
string
default:PostgreSQL

Display name for the connection

Minimum string length: 1
hostname
string

PostgreSQL server hostname

Required string length: 1 - 255
port
integer
default:5432

Port number

username
string

Database username

Required string length: 1 - 255
password
string
write-only

Database password

Minimum string length: 1
database_name
string

Database name

Required string length: 1 - 255
connection_string
string

Alternative: full connection string instead of individual parameters

Minimum string length: 1
selected_schemas
string[]

List of schema names to include in queries and overviews. If empty, all schemas except system schemas will be included.

Required string length: 1 - 255

Response

Response serializer for add connection endpoint.

id
integer
required

The ID of the created connection

public_key_sql
string

SQL command to add public key to Snowflake (only for Snowflake key-pair auth)