First Steps

After you have access to an Eden-MDBS instance and have created an organization, this guide walks you through the essential first steps to get productive.

Step 1: Log In and Get Your Token

First, authenticate to get a JWT token for API access:

bash
curl http://{host}:8000/api/v1/auth/login \
  -u your_username:your_password \
  -X POST

Response:

json
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Save this token for subsequent API calls:

bash
export TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Step 2: Create Your First User

If you're a SuperAdmin or Admin, you can create additional users:

bash
curl http://{host}:8000/api/v1/iam/users \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "username": "developer@company.com",
    "password": "SecurePassword123!",
    "description": "Development team member",
    "access_level": "Write"
  }'

Access Level Options

LevelDescription
ReadView and query resources
WriteRead permissions plus modify data
AdminWrite permissions plus manage configurations
SuperAdminFull control including other admin management

Step 3: Connect Your First Endpoint

Endpoints are connections to your databases and services. Here's how to connect a PostgreSQL database:

bash
curl http://{host}:8000/api/v1/endpoints \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "id": "my_postgres",
    "kind": "Postgres",
    "config": {
      "write_conn": {
        "url": "postgresql://user:password@db-host:5432/database"
      }
    }
  }'

Response:

json
{
  "status": "success",
  "data": {
    "id": "my_postgres",
    "uuid": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Step 4: Run Your First Query

Read Query

bash
curl http://{host}:8000/api/v1/endpoints/my_postgres/read \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "query": "SELECT * FROM users LIMIT 10"
  }'

Response:

json
{
  "status": "success",
  "data": {
    "rows": [
      {"id": 1, "name": "John Doe", "email": "john@example.com"},
      {"id": 2, "name": "Jane Smith", "email": "jane@example.com"}
    ],
    "row_count": 2
  }
}

Write Query

bash
curl http://{host}:8000/api/v1/endpoints/my_postgres/write \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "query": "INSERT INTO users (name, email) VALUES ($1, $2) RETURNING id",
    "params": ["Alice Johnson", "alice@example.com"]
  }'

Step 5: Grant Access to Your Team

Allow other users to access the endpoint:

bash
curl http://{host}:8000/api/v1/iam/rbac/endpoints/subjects \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "subjects": [
      ["developer@company.com", "Write"],
      ["analyst@company.com", "Read"]
    ]
  }'

Step 6: Verify Your Setup

Check Your Organization

bash
curl http://{host}:8000/api/v1/organizations \
  -H "Authorization: Bearer $TOKEN"

List Your Endpoints

bash
curl http://{host}:8000/api/v1/endpoints \
  -H "Authorization: Bearer $TOKEN"

Check Your Permissions

bash
curl http://{host}:8000/api/v1/iam/rbac/endpoints/my_postgres/subjects \
  -H "Authorization: Bearer $TOKEN"

Common Endpoint Types

Eden supports multiple database and service types:

Databases

KindExample Use Case
PostgresPrimary relational data
MySQLLegacy application data
MongoDocument storage
RedisCaching and sessions
CassandraHigh-throughput time series
ClickHouseAnalytics and aggregations
MssqlEnterprise SQL Server
OracleEnterprise Oracle databases

Services

KindExample Use Case
HttpExternal REST APIs
LlmAI/ML model integrations
PineconeVector similarity search

Next Steps

Now that you have the basics set up:

  1. Concepts - Understand Eden's core concepts
  2. Endpoints - Learn about different endpoint types
  3. RBAC - Set up access control for your team
  4. Templates - Create reusable query templates

Quick Reference

TaskEndpointMethod
Login/api/v1/auth/loginPOST
Create user/api/v1/iam/usersPOST
Create endpoint/api/v1/endpointsPOST
Read query/api/v1/endpoints/{id}/readPOST
Write query/api/v1/endpoints/{id}/writePOST
Grant access/api/v1/iam/rbac/endpoints/subjectsPOST
Get organization info/api/v1/organizationsGET
Last updated: October 20, 2018
Size: 5.38 KB
    Eden