Create connection
fastero_create_connectionCreate a data connection to a database that signs in with a username and password (Postgres, MySQL, SQL Server, Redshift, Snowflake, Oracle), available to the whole organisation. The credentials given in creds, the password among them, pass through the model and are kept in plain text in the client session transcript, so creating a direct-credential connection in the Fastero web app is the preferred route. OAuth sources such as BigQuery and Google Sheets cannot be created this way and need a browser sign-in; an uploaded CSV or Excel file becomes a connection with fastero_create_file_connection. It connects before saving, so a database it cannot reach is not saved. The refusal names a common cause, such as a wrong password, an unknown host or Oracle service, or a firewall that needs Fastero's address allowed; any other gives the driver's error code and the settings to check. For a Postgres, MySQL, SQL Server, Redshift or Oracle database behind an SSH bastion, creds also takes sshHost, sshPort (22), sshUsername, sshKeyId from fastero_create_ssh_key, and sshHostKey; host is then the database's host as the bastion reaches it, and for Oracle its IP address. A first call without sshHostKey is refused with the bastion's host-key fingerprint, which the person can compare on the bastion; the same call with it as sshHostKey goes ahead. Returns the new connection's _id, the connectionId other tools take. Owners, admins and editors of the organisation can create one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The connection’s name, as people will see it in Fastero. | |
| creds | Yes | Credential fields for the datasource. For SQL: host, port, database, username (not "user"), password, sslMode ("require" for TLS). For SQL Server also encrypt (true or false; on by default for an Azure SQL host). For Oracle, service (the service name, such as ORCLPDB1) in place of database. For Snowflake: account, username, password, warehouse and database. | |
| projectId | No | Not needed: the connection belongs to the whole organisation whichever project is named here (a project’s id, from fastero_list_projects). | |
| datasource | Yes | Datasource key: pg (not "postgres"), mysql, mysql2, mssql, redshift, snowflake, oracle. |