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.
First, authenticate to get a JWT token for API access:
curl http://{host}:8000/api/v1/auth/login \
-u your_username:your_password \
-X POSTResponse:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}Save this token for subsequent API calls:
export TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."If you're a SuperAdmin or Admin, you can create additional users:
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"
}'| Level | Description |
|---|---|
| Read | View and query resources |
| Write | Read permissions plus modify data |
| Admin | Write permissions plus manage configurations |
| SuperAdmin | Full control including other admin management |
Endpoints are connections to your databases and services. Here's how to connect a PostgreSQL database:
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:
{
"status": "success",
"data": {
"id": "my_postgres",
"uuid": "550e8400-e29b-41d4-a716-446655440000"
}
}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:
{
"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
}
}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"]
}'Allow other users to access the endpoint:
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"]
]
}'curl http://{host}:8000/api/v1/organizations \
-H "Authorization: Bearer $TOKEN"curl http://{host}:8000/api/v1/endpoints \
-H "Authorization: Bearer $TOKEN"curl http://{host}:8000/api/v1/iam/rbac/endpoints/my_postgres/subjects \
-H "Authorization: Bearer $TOKEN"Eden supports multiple database and service types:
| Kind | Example Use Case |
|---|---|
| Postgres | Primary relational data |
| MySQL | Legacy application data |
| Mongo | Document storage |
| Redis | Caching and sessions |
| Cassandra | High-throughput time series |
| ClickHouse | Analytics and aggregations |
| Mssql | Enterprise SQL Server |
| Oracle | Enterprise Oracle databases |
| Kind | Example Use Case |
|---|---|
| Http | External REST APIs |
| Llm | AI/ML model integrations |
| Pinecone | Vector similarity search |
Now that you have the basics set up:
| Task | Endpoint | Method |
|---|---|---|
| Login | /api/v1/auth/login | POST |
| Create user | /api/v1/iam/users | POST |
| Create endpoint | /api/v1/endpoints | POST |
| Read query | /api/v1/endpoints/{id}/read | POST |
| Write query | /api/v1/endpoints/{id}/write | POST |
| Grant access | /api/v1/iam/rbac/endpoints/subjects | POST |
| Get organization info | /api/v1/organizations | GET |