Quickstart
This guide walks you through creating your first workspace and connection.
1. Create a workspace
Section titled “1. Create a workspace”- Log in to the DataRecs Console.
- Click New Workspace from the workspace selector.
- Enter a name and click Create.
datarecs logindatarecs workspace create --name "my-workspace"resource "datarecs_workspace" "main" { name = "my-workspace"}tofu applycurl -X POST https://api.datarecs.com/v1/workspaces \ -H "Authorization: Bearer $DATARECS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "my-workspace"}'2. Add a connection
Section titled “2. Add a connection”- Navigate to Connections in the sidebar.
- Click New Connection.
- Select your database type, enter credentials, and click Test & Save.
datarecs connection create \ --name "production-mysql" \ --type mysql \ --host db.example.com \ --port 3306 \ --database mydb \ --username readonly_userYou will be prompted for the password securely.
resource "datarecs_connection" "prod_mysql" { workspace_id = datarecs_workspace.main.id name = "production-mysql" type = "mysql" host = "db.example.com" port = 3306 database = "mydb" username = "readonly_user" password = var.db_password}curl -X POST https://api.datarecs.com/v1/connections \ -H "Authorization: Bearer $DATARECS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "production-mysql", "type": "mysql", "host": "db.example.com", "port": 3306, "database": "mydb", "username": "readonly_user", "password": "REDACTED" }'